code: func Factories(fs map[string]plugins.Factory) func(*Discovery) {
  	return func(d *Discovery) {
  		d.factories = fs
  	}
  }
docs: // Factories provides a set of factory functions to use for
  // instantiating custom plugins.