diff options
| author | Alex Flint <[email protected]> | 2019-05-03 15:02:10 -0700 |
|---|---|---|
| committer | Alex Flint <[email protected]> | 2019-05-03 15:02:10 -0700 |
| commit | 15bf383f1d5db9bf362029529f3c83f092e2d00f (patch) | |
| tree | 8cb7448834eacb0039546a5b10d896af11437400 /parse.go | |
| parent | edd1af466781355875c44cd9213ce1e398a4c84d (diff) | |
add subcommands to usage string
Diffstat (limited to 'parse.go')
| -rw-r--r-- | parse.go | 3 |
1 files changed, 3 insertions, 0 deletions
@@ -59,6 +59,7 @@ type spec struct { // command represents a named subcommand, or the top-level command type command struct { name string + help string dest path specs []*spec subcommands []*command @@ -296,6 +297,8 @@ func cmdFromStruct(name string, dest path, t reflect.Type) (*command, error) { return false } + subcmd.help = field.Tag.Get("help") + cmd.subcommands = append(cmd.subcommands, subcmd) isSubcommand = true default: |
