Feature: Add support for an interface for complicated defaults
Eyal-Shalev opened this issue · comments
Eyal Halpern Shalev commented
type Defaults interface {
Defaults(raw string) (interface{}, error)
}
example
type Duration time.Duration
func (d *Duration) Defaults(raw string) (interface{}, error) {
return time.ParseDuration(raw)
}