summaryrefslogtreecommitdiff
path: root/vendor/github.com/jessevdk/go-flags/command.go
diff options
context:
space:
mode:
authorLibravatar kim <grufwub@gmail.com>2025-11-03 13:55:04 +0100
committerLibravatar tobi <tobi.smethurst@protonmail.com>2025-11-17 14:12:09 +0100
commit81e3cdda44a2aed1ad0805fa738429c891b6209d (patch)
treed9c3c95eb721e1dc1c613ee7370eaad9ec8796f7 /vendor/github.com/jessevdk/go-flags/command.go
parent[chore] add a 'nos3' build tag to support compiling without S3 storage suppor... (diff)
downloadgotosocial-81e3cdda44a2aed1ad0805fa738429c891b6209d.tar.xz
[chore] update dependencies (#4539)
- github.com/KimMachineGun/automemlimit: v0.7.4 -> v0.7.5 - github.com/tdewolff/minify/v2: v2.24.4 -> v2.24.5 - modernc.org/sqlite: v1.39.1 -> v1.40.0 w/ concurrency workaround - github.com/go-swagger/go-swagger: v0.32.3 -> v0.33.1 (and drops use of our custom fork now the fix is available upstream) Reviewed-on: https://codeberg.org/superseriousbusiness/gotosocial/pulls/4539 Co-authored-by: kim <grufwub@gmail.com> Co-committed-by: kim <grufwub@gmail.com>
Diffstat (limited to 'vendor/github.com/jessevdk/go-flags/command.go')
-rw-r--r--vendor/github.com/jessevdk/go-flags/command.go11
1 files changed, 11 insertions, 0 deletions
diff --git a/vendor/github.com/jessevdk/go-flags/command.go b/vendor/github.com/jessevdk/go-flags/command.go
index 879465d7a..ac4f1e392 100644
--- a/vendor/github.com/jessevdk/go-flags/command.go
+++ b/vendor/github.com/jessevdk/go-flags/command.go
@@ -30,6 +30,12 @@ type Command struct {
// Whether positional arguments are required
ArgsRequired bool
+ // Whether to pass all arguments after the first non option as remaining
+ // command line arguments. This is equivalent to strict POSIX processing.
+ // This is command-local version of PassAfterNonOption Parser flag. It
+ // cannot be turned off when PassAfterNonOption Parser flag is set.
+ PassAfterNonOption bool
+
commands []*Command
hasBuiltinHelpGroup bool
args []*Arg
@@ -244,6 +250,7 @@ func (c *Command) scanSubcommandHandler(parentg *Group) scanHandler {
longDescription := mtag.Get("long-description")
subcommandsOptional := mtag.Get("subcommands-optional")
aliases := mtag.GetMany("alias")
+ passAfterNonOption := mtag.Get("pass-after-non-option")
subc, err := c.AddCommand(subcommand, shortDescription, longDescription, ptrval.Interface())
@@ -261,6 +268,10 @@ func (c *Command) scanSubcommandHandler(parentg *Group) scanHandler {
subc.Aliases = aliases
}
+ if len(passAfterNonOption) > 0 {
+ subc.PassAfterNonOption = true
+ }
+
return true, nil
}