Description

Bind a specific key to a flag (as used by cobra) Example(where serverCmd is a Cobra instance):

serverCmd.Flags().Int("port", 1138, "Port to run Application server on")
Viper.BindPFlag("port", serverCmd.Flags().Lookup("port"))

BindPFlag is referenced in 1 repository

github.com/centrifugal/centrifugo