func (option Option) validate(name string, value interface{}) (_ interface{}, err error) {
	if value == nil {
		return nil, nil
	}
	if checker := optionTypeCheckers[option.Type]; checker != nil {
		defer option.error(&err, name, value)
		if value, err = checker.Coerce(value, nil); err != nil {
			return nil, err
		}
		return value, nil
	}
	return nil, fmt.Errorf("option %q has unknown type %q", name, option.Type)
}
// validate returns an appropriately-typed value for the supplied value, or
// returns an error if it cannot be converted to the correct type. Nil values
// are always considered valid.
validate returns an appropriately-typed value for the supplied value, or
returns an error if it cannot be converted to the correct type. Nil values
are always considered valid.
// validate returns an appropriately - typed value for the supplied value or // returns an error if it cannot be converted to the correct type . Nil values // are always considered valid .
func (option Option) validate(name string, value interface{}) (_ interface{}, err error) {
	if value == nil {
		return nil, nil
	}
	if checker := optionTypeCheckers[option.Type]; checker != nil {
		defer option.error(&err, name, value)
		if value, err = checker.Coerce(value, nil); err != nil {
			return nil, err
		}
		return value, nil
	}
	return nil, fmt.Errorf("option %q has unknown type %q", name, option.Type)
}
func ( option Option ) validate ( name string , value interface { } ) ( _ interface { } , err error ) { if value == nil { return nil , nil } if checker := optionTypeCheckers [ option . Type ] ; checker != nil { defer option . error ( & err , name , value ) if value , err = checker . Coerce ( value , nil ) ; err != nil { return nil , err } return value , nil } return nil , fmt . Errorf ( " " , name , option . Type ) }
validate returns an appropriately-typed value for the supplied value, or
returns an error if it cannot be converted to the correct type.
validate returns an appropriately - typed value for the supplied value or returns an error if it cannot be converted to the correct type .