diff --git a/examples/command-line-subcommands/command-line-subcommands.go b/examples/command-line-subcommands/command-line-subcommands.go index 132c9ec..af57b21 100644 --- a/examples/command-line-subcommands/command-line-subcommands.go +++ b/examples/command-line-subcommands/command-line-subcommands.go @@ -36,10 +36,10 @@ func main() { // Check which subcommand is invoked. switch os.Args[1] { - case "foo": - // For every subcommand, we parse its own flags and - // have access to trailing positional arguments. + // For every subcommand, we parse its own flags and + // have access to trailing positional arguments. + case "foo": fooCmd.Parse(os.Args[2:]) fmt.Println("subcommand 'foo'") fmt.Println(" enable:", *fooEnable) diff --git a/examples/command-line-subcommands/command-line-subcommands.hash b/examples/command-line-subcommands/command-line-subcommands.hash index b26ba5f..f22bcc8 100644 --- a/examples/command-line-subcommands/command-line-subcommands.hash +++ b/examples/command-line-subcommands/command-line-subcommands.hash @@ -1,2 +1,2 @@ -673d7811734cfd8f8f5bcb411e12def1e158cf0b -V7xR3wMkquz +5a0ec258e4992e9b93b11d48f2f249092ff3db66 +gtgSAg76N4I diff --git a/public/command-line-subcommands b/public/command-line-subcommands index 190970c..f53c19f 100644 --- a/public/command-line-subcommands +++ b/public/command-line-subcommands @@ -32,7 +32,7 @@ subcommands that have their own flags.
package main
switch os.Args[1] {
- case "foo":
fooCmd.Parse(os.Args[2:])
+ case "foo":
+ fooCmd.Parse(os.Args[2:])
fmt.Println("subcommand 'foo'")
fmt.Println(" enable:", *fooEnable)
fmt.Println(" name:", *fooName)
@@ -218,7 +218,7 @@ have access to trailing positional arguments.
flag provided but not defined: -enable
Usage of bar:
-level int
- bar level
+ level