View definition

func BindFlagValue

Defined in github.com/spf13/viper/viper.go

Description

Bind 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"))

BindFlagValue is referenced in 1 repository

github.com/spf13/viper