Implemented most of the base parser.

This includes branching arguments as well as commands, eg.

    app user create <id> <first> <last>
    app user <id> delete
    app user <id> rename <to>

Of note, required/optional flags and positional arguments are not
currently enforced.
This commit is contained in:
Alec Thomas
2018-05-16 20:33:18 +10:00
parent 8516c68cc9
commit 1d00dfef7b
10 changed files with 601 additions and 46 deletions
+1 -1
View File
@@ -5,6 +5,6 @@ import "os"
func Parse(cli interface{}) {
parser, err := New("", "", cli)
parser.FatalIfErrorf(err)
err = parser.Parse(os.Args[1:])
_, err = parser.Parse(os.Args[1:])
parser.FatalIfErrorf(err)
}