Skip to content

docs: fix ErrHelpWanted / ErrVersionWanted description in Parse and ParseWithOptions doc comments - #60

Merged
ardan-bkennedy merged 1 commit into
ardanlabs:masterfrom
stefanlatinovic:patch-1
Sep 9, 2026
Merged

ardan-bkennedy merged 1 commit into
ardanlabs:masterfrom
stefanlatinovic:patch-1

Conversation

@stefanlatinovic

Copy link
Copy Markdown
Contributor

Summary

The doc comments on Parse and ParseWithOptions claimed that ErrHelpWanted is returned when either --help or --version is detected. That is inaccurate: ParseWithOptions returns ErrHelpWanted for --help and the distinct ErrVersionWanted for --version. This corrects both comments to reflect the actual control flow.

Changes

  • Parse doc comment: distinguish ErrHelpWanted (--help) from ErrVersionWanted (--version).
  • ParseWithOptions doc comment: same correction.

Documentation only — no behavior change.

…seWithOptions` doc comments

The doc comments for `Parse` and `ParseWithOptions` stated that `ErrHelpWanted` is returned for both `--help` and `--version`. In fact `--version` returns the separate `ErrVersionWanted` sentinel. Corrected both comments to match the switch in `ParseWithOptions`.
@ardan-bkennedy

Copy link
Copy Markdown
Collaborator

Thanks for the fixes

@ardan-bkennedy
ardan-bkennedy merged commit 915781f into ardanlabs:master Sep 9, 2026
@stefanlatinovic
stefanlatinovic deleted the patch-1 branch September 9, 2026 16:51
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants