Codebase list golang-github-integrii-flaggy / 3b3e0a3b-816f-45bc-83d4-9bd96cea8fde/upstream positionalValue.go
3b3e0a3b-816f-45bc-83d4-9bd96cea8fde/upstream

Tree @3b3e0a3b-816f-45bc-83d4-9bd96cea8fde/upstream (Download .tar.gz)

positionalValue.go @3b3e0a3b-816f-45bc-83d4-9bd96cea8fde/upstreamraw · history · blame

package flaggy

// PositionalValue represents a value which is determined by its position
// relative to where a subcommand was detected.
type PositionalValue struct {
	Name          string // used in documentation only
	Description   string
	AssignmentVar *string // the var that will get this variable
	Position      int     // the position, not including switches, of this variable
	Required      bool    // this subcommand must always be specified
	Found         bool    // was this positional found during parsing?
	Hidden        bool    // indicates this positional value should be hidden from help
	defaultValue  string  // used for help output
}