Skip to content

Commit 75fd461

Browse files
committed
docs: clean up some pkg level docs and some comments
1 parent 34ce5fc commit 75fd461

File tree

2 files changed

+10
-11
lines changed

2 files changed

+10
-11
lines changed

cli.go

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -53,16 +53,16 @@
5353
//
5454
// The following are some common ways of how options can be provided:
5555
//
56-
// --opt // long form boolean option
57-
// --opt=v // long form non-boolean option with value of "v"
58-
// --opt v // same as above, non-boolean options can provide their value as the next command line argument
59-
// -a // short form boolean option "a"
60-
// -a -b // two short form boolean option "a" and "b"
61-
// -ab // either same as above, or short form non-boolean option "a" with value of "b" (depends on specified command structure)
56+
// --opt // long form boolean option "opt"
57+
// -o // short form boolean option "o"
58+
// --opt=val // long form non-boolean option with value of "val"
59+
// --opt val // same as above, non-boolean options can provide their value as the next command line argument
60+
// -a -b // two short form boolean options, "a" and "b"
61+
// -ab // either same as above, or short form non-boolean option "a" with value of "b" (depends on specified command structure)
6262
//
6363
// # Basic Usage
6464
//
65-
// p := cli.New().
65+
// c := cli.New().
6666
// Help("A full example program").
6767
// Opt(cli.NewBoolOpt("yes").
6868
// Short('y').
@@ -536,9 +536,9 @@ func parse(c *CommandInfo, p *Command, args []string) error {
536536
if len(missing) > 0 {
537537
errMissingOpts = MissingOptionsError{Names: missing}
538538

539-
// If we are parsing positional arguments instead of subcommands, we can just
540-
// return this error right now. Otherwise we have to wait to see if a subcommand
541-
// requests help.
539+
// If we are about to parse positional arguments instead of subcommands,
540+
// we can just return this error right now. Otherwise we have to wait
541+
// to see if a subcommand requests help.
542542
if len(c.Subcmds) == 0 {
543543
return errMissingOpts
544544
}

docs/README.md

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,6 @@ go get github.com/steverusso/cli@latest
1212
* There are **zero** external dependencies.
1313
* No required project / file layout or recommended use of a generator.
1414
* No reflection.
15-
* Fully POSIX-compliant flags (including short & long versions). (TODO reword and check if true)
1615
* Inputs can additionally be parsed from environment variables and / or default values.
1716
* Nested subcommands.
1817
* Clean, well-formatted help messages by default.

0 commit comments

Comments
 (0)