A Value is either a flag or a variable positional argument.
| 242 | |
| 243 | // A Value is either a flag or a variable positional argument. |
| 244 | type Value struct { |
| 245 | Flag *Flag // Nil if positional argument. |
| 246 | Name string |
| 247 | Help string |
| 248 | OrigHelp string // Original help string, without interpolated variables. |
| 249 | HasDefault bool |
| 250 | Default string |
| 251 | DefaultValue reflect.Value |
| 252 | Enum string |
| 253 | Mapper Mapper |
| 254 | Tag *Tag |
| 255 | Target reflect.Value |
| 256 | Required bool |
| 257 | Set bool // Set to true when this value is set through some mechanism. |
| 258 | Format string // Formatting directive, if applicable. |
| 259 | Position int // Position (for positional arguments). |
| 260 | Passthrough bool // Deprecated: Use PassthroughMode instead. Set to true to stop flag parsing when encountered. |
| 261 | PassthroughMode PassthroughMode // |
| 262 | Active bool // Denotes the value is part of an active branch in the CLI. |
| 263 | } |
| 264 | |
| 265 | // EnumMap returns a map of the enums in this value. |
| 266 | func (v *Value) EnumMap() map[string]bool { |
nothing calls this directly
no outgoing calls
no test coverage detected