package main import ( "fmt" "os" "git.pyer.club/kingecg/command" ) func main() { var cmd = command.NewCommand("test", "test command") cmd.AddArg("arg1", "a", "arg1 description", "default value") cmd.AddArg("arg2", "b", "arg2 description", "default value") cmd.AddSubCommand("sub1", "sub1 description") cmd.Parse(os.Args[1:]) fmt.Println(cmd.GetGlobalOptions()) }