go-arg
go-arg copied to clipboard
Passing the no-more-options string "--" twice or more
Passing the no-more-options string "--" twice or more should pass the second and subsequent ones through as positionals. This makes it possible to pass the string "--" as a positional:
var args struct {
X []string `arg:"positional"
}
arg.MustParse(&args)
./example -- test test2 -- test3 // args.X is [test, test2, --, test3]