diff --git a/README.md b/README.md index e9cb6a7..fadf1ca 100644 --- a/README.md +++ b/README.md @@ -74,7 +74,7 @@ var ( // Define a second sub command from the root command with an int flag. sub2 = root.SubCommand("sub2", "second sub command") - flag2 = sub1.Int("flag2", 0, "sub2 int flag") + flag2 = sub2.Int("flag2", 0, "sub2 int flag") ) // Definition and usage of sub commands and sub commands flags. diff --git a/example_1_subcommand_test.go b/example_1_subcommand_test.go index d5d7403..f10877a 100644 --- a/example_1_subcommand_test.go +++ b/example_1_subcommand_test.go @@ -19,7 +19,7 @@ var ( // Define a second sub command from the root command with an int flag. sub2 = root.SubCommand("sub2", "second sub command") - flag2 = sub1.Int("flag2", 0, "sub2 int flag") + flag2 = sub2.Int("flag2", 0, "sub2 int flag") ) // Definition and usage of sub commands and sub commands flags.