Skip to content

docs: add godoc comments to args.go exported symbols - #2533

Open
Chris-cez wants to merge 2 commits into
urfave:mainfrom
Chris-cez:docs/args-godoc-comments
Open

Chris-cez wants to merge 2 commits into
urfave:mainfrom
Chris-cez:docs/args-godoc-comments

Conversation

@Chris-cez

Copy link
Copy Markdown

The Args interface, the ArgumentBase type, all 31 ArgumentBase/ArgumentsBase
type aliases (StringArg, IntArg, FloatArgs, ...), and all 30 Command
positional-argument accessor methods (StringArg, IntArgs, ...) had no godoc
comment, so go doc/pkg.go.dev showed nothing useful for most of the
positional-argument API.

No behavior change, comments only. godoc-current.txt and
testdata/godoc-v3.x.txt were regenerated per CONTRIBUTING.md.

Closes #2528

Note: I noticed another PR (#2532) may already address this issue —
I had started this before seeing it, so leaving it open in case it's useful
for comparison or if maintainers prefer this version.

The Args interface, the ArgumentBase type, all 31 ArgumentBase/ArgumentsBase
type aliases (StringArg, IntArg, FloatArgs, ...), and all 30 Command
positional-argument accessor methods (StringArg, IntArgs, ...) had no godoc
comment, so go doc/pkg.go.dev showed nothing useful for most of the
positional-argument API.

No behavior change, comments only. godoc-current.txt and
testdata/godoc-v3.x.txt are regenerated per CONTRIBUTING.md.
@Chris-cez
Chris-cez requested a review from a team as a code owner November 7, 2026 21:42
HasName, Usage, Parse, and Get on both ArgumentBase and ArgumentsBase
implement the Argument interface but had no godoc comments of their
own, so they showed up undocumented in go doc/pkg.go.dev.

No behavior change, comments only. godoc-current.txt and
testdata/godoc-v3.x.txt are regenerated per CONTRIBUTING.md.
@Chris-cez

Copy link
Copy Markdown
Author

While comparing this PR with #2532 (which targets the same issue, #2528), I noticed that HasName, Usage, Parse, and Get on both ArgumentBase and ArgumentsBase were still missing doc comments in my original commit, even though they're part of the public Argument interface surface. I've pushed a second commit that adds godoc comments to those 8 methods, so this PR now has the same documentation coverage as #2532.

godoc-current.txt and testdata/godoc-v3.x.txt were regenerated to match, and go build, go vet, and go test ./... all pass with the new commit.

Happy to adjust wording or scope based on reviewer feedback.

This branch has not been deployed

No deployments
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.

docs: args.go exported types and accessor methods lack godoc comments

2 participants