envoid/vendor/github.com/creasty/defaults/setter.go

13 lines
201 B
Go
Raw Normal View History

package defaults
// Setter is an interface for setting default values
type Setter interface {
SetDefaults()
}
func callSetter(v interface{}) {
if ds, ok := v.(Setter); ok {
ds.SetDefaults()
}
}