Files
kong/global.go
T
2018-05-21 09:25:19 -04:00

13 lines
297 B
Go

package kong
import "os"
// Parse constructs a new parser and parses the default command-line.
func Parse(cli interface{}, options ...Option) string {
parser, err := New(cli, options...)
parser.FatalIfErrorf(err)
cmd, err := parser.Parse(os.Args[1:])
parser.FatalIfErrorf(err)
return cmd
}