forked from mirror/viper
parent
df9f4af211
commit
f2cbaea4c2
5
viper.go
5
viper.go
|
@ -996,11 +996,6 @@ func (v *Viper) BindFlagValues(flags FlagValueSet) (err error) {
|
|||
}
|
||||
|
||||
// BindFlagValue binds a specific key to a FlagValue.
|
||||
// Example (where serverCmd is a Cobra instance):
|
||||
//
|
||||
// serverCmd.Flags().Int("port", 1138, "Port to run Application server on")
|
||||
// Viper.BindFlagValue("port", serverCmd.Flags().Lookup("port"))
|
||||
//
|
||||
func BindFlagValue(key string, flag FlagValue) error { return v.BindFlagValue(key, flag) }
|
||||
func (v *Viper) BindFlagValue(key string, flag FlagValue) error {
|
||||
if flag == nil {
|
||||
|
|
Loading…
Reference in New Issue