1
0
mirror of https://github.com/jesseduffield/lazygit.git synced 2026-05-22 10:15:43 +02:00
Files
lazygit/vendor/github.com/integrii/flaggy/parsedValue.go
T
dependabot[bot] dbb1ff4f24 Bump github.com/integrii/flaggy from 1.4.0 to 1.8.0
Bumps [github.com/integrii/flaggy](https://github.com/integrii/flaggy) from 1.4.0 to 1.8.0.
- [Release notes](https://github.com/integrii/flaggy/releases)
- [Commits](https://github.com/integrii/flaggy/compare/v1.4.0...v1.8.0)

---
updated-dependencies:
- dependency-name: github.com/integrii/flaggy
  dependency-version: 1.8.0
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
2026-04-01 09:17:06 +00:00

26 lines
909 B
Go

package flaggy
// parsedValue represents a flag or subcommand that was parsed. Primarily used
// to account for all parsed values in order to determine if unknown values were
// passed to the root parser after all subcommands have been parsed.
type parsedValue struct {
Key string
Value string
IsPositional bool // indicates that this value was positional and not a key/value
ConsumesNext bool // indicates that parsing this value consumed the following CLI token
}
// newParsedValue creates and returns a new parsedValue struct with the
// supplied values set
func newParsedValue(key string, value string, isPositional bool, consumesNext bool) parsedValue {
if len(key) == 0 && len(value) == 0 {
panic("can't add parsed value with no key or value")
}
return parsedValue{
Key: key,
Value: value,
IsPositional: isPositional,
ConsumesNext: consumesNext,
}
}