func (fo *funcOption) apply(o interface{}) error {
	return fo.f(o)
}
apply applies a functional option to an object.
package config
func WithNotify(fn NotifyFn) Option {
	return newFuncOption(func(o interface{}) error {
		switch o.(type) {
		case *Module:
			m := o.(*Module)
			m.notifiers = append(m.notifiers, fn)
		default:
			return configError("WithNotify is not valid for object of type %T", o)
		}
		return nil
	})
}
func WithoutDataValidation() Option {
	return newFuncOption(func(o interface{}) error {
		switch o.(type) {
		case *Module:
			m := o.(*Module)
			m.noValidate = true
		default:
			return configError("WithoutDataValidation is not valid for object of type %T", o)
		}
		return nil
	})
}
type Option interface {
	apply(interface{}) error
}
type funcOption struct {
	f func(interface{}) error
}