You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
$ cat go.mod
module main
go 1.21.4
require github.com/alexflint/go-arg v1.4.3
require github.com/alexflint/go-scalar v1.1.0 // indirect
$ cat main.go
package main
import (
arg "github.com/alexflint/go-arg"
)
type options struct {
Sub *Sub `arg:"subcommand"`
}
type Sub struct {
A string `arg:"positional"`
}
func main() {
var opts options
arg.MustParse(&opts)
}
Actual
$ go run . sub --help
Usage: main sub [A]
Positional arguments:
A
--help, -h display this help and exit
Expected
$ go run . sub --help
Usage: main sub [A]
Positional arguments:
A
Global options:
--help, -h display this help and exit
The text was updated successfully, but these errors were encountered:
Setup
Actual
Expected
The text was updated successfully, but these errors were encountered: