13 lines
201 B
Go
13 lines
201 B
Go
|
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()
|
||
|
}
|
||
|
}
|