Sagi Dayan
d5d1eecb89
Some checks failed
Codespell / Check for spelling errors (push) Failing after 1m26s
Signed-off-by: Sagi Dayan <sagidayan@gmail.com>
12 lines
201 B
Go
12 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()
|
|
}
|
|
}
|