Documentation ¶ Index ¶ func BindFlags(cmd *cobra.Command, flags []Flag) (err error) type Flag type Type Constants ¶ This section is empty. Variables ¶ This section is empty. Functions ¶ func BindFlags ¶ func BindFlags(cmd *cobra.Command, flags []Flag) (err error) BindFlags will bind each flag to cobra's command, so it can extract them Types ¶ type Flag ¶ type Flag struct { Name string Type Type Shorthand string Value interface{} Usage string } Flag structure for flags in configuration type Type ¶ type Type int Type indicates the value type of a flag const ( // Bool value type for bool Bool Type = 1 // Int value type for int Int Type = 2 // String value type for string String Type = 3 // StringSlice value type for []string StringSlice Type = 4 ) Source Files ¶ View all Source files flag.go Click to show internal directories. Click to hide internal directories.