Use "kong" as tag keys fixes #9 (#10)

This commit is contained in:
Gerald Kaszuba
2018-05-21 23:25:19 +10:00
committed by Alec Thomas
parent 184735e689
commit 3eb5e285ed
8 changed files with 304 additions and 98 deletions
+3 -2
View File
@@ -3,9 +3,10 @@ package kong
import "os"
// Parse constructs a new parser and parses the default command-line.
func Parse(cli interface{}, options ...Option) {
func Parse(cli interface{}, options ...Option) string {
parser, err := New(cli, options...)
parser.FatalIfErrorf(err)
_, err = parser.Parse(os.Args[1:])
cmd, err := parser.Parse(os.Args[1:])
parser.FatalIfErrorf(err)
return cmd
}