Unknown arguments supplied
yougg opened this issue · 0 comments
yougg commented
"Unknown arguments supplied" when the subcommand and flag have same shortname
// example.go
package main
import (
"fmt"
"github.com/integrii/flaggy"
)
func main() {
subcmd := flaggy.NewSubcommand("testSubCmd")
subcmd.ShortName = `t`
var test string
subcmd.String(&test, "t", "testFlag", "test flag")
flaggy.AttachSubcommand(subcmd, 1)
flaggy.Parse()
fmt.Println(test)
}
go run example.go t -t hello
testSubCmdFlags:
--version Displays the program version string.
-h --help Displays help with available flag, subcommand, and positional value parameters.
-t --testFlag test flagUnknown arguments supplied: hello
exit status 2