MCPcopy
hub / github.com/spf13/viper / BindFlagValues

Method BindFlagValues

viper.go:1085–1092  ·  view source on GitHub ↗
(flags FlagValueSet)

Source from the content-addressed store, hash-verified

1083func BindFlagValues(flags FlagValueSet) error { return v.BindFlagValues(flags) }
1084
1085func (v *Viper) BindFlagValues(flags FlagValueSet) (err error) {
1086 flags.VisitAll(func(flag FlagValue) {
1087 if err = v.BindFlagValue(flag.Name(), flag); err != nil {
1088 return
1089 }
1090 })
1091 return nil
1092}
1093
1094// BindFlagValue binds a specific key to a FlagValue.
1095func BindFlagValue(key string, flag FlagValue) error { return v.BindFlagValue(key, flag) }

Callers 2

BindPFlagsMethod · 0.95
BindFlagValuesFunction · 0.80

Calls 3

BindFlagValueMethod · 0.95
VisitAllMethod · 0.65
NameMethod · 0.65

Tested by

no test coverage detected