Alec Thomas 1d00dfef7b 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.
2018-05-16 20:33:18 +10:00
2018-04-10 16:51:06 +10:00
2018-05-16 20:33:18 +10:00
2018-04-10 16:51:06 +10:00
2018-05-16 20:33:18 +10:00
2018-05-16 20:33:18 +10:00
2018-05-16 20:33:18 +10:00
2018-04-10 16:51:06 +10:00

Kong is a command-line parser for Go

It parses a command-line into a struct. eg.

package main

import "github.com/alecthomas/kong"

var CLI struct {
  Rm struct {
    Force     bool `help:"Force removal."`
    Recursive bool `help:"Recursively remove files."`

    Paths []string `help:"Paths to remove." type:"path"`
  } `help:"Remove files."`

  Ls struct {
    Paths []string `help:"Paths to list." type:"path"`
  } `help:"List paths."`
}

func main() {
  kong.Parse(&CLI)
}
S
Description
Kong is a command-line parser for Go
Readme 1.2 MiB
Languages
Go 99.6%
Shell 0.4%