Repository navigation
Conversation
This was referenced Oct 19, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Overview:
Two comments in
flags.gonamed pflag types that do not exist.pflagValueSetwas described as "a wrapper around*pflag.ValueSet" while the struct holds*pflag.FlagSet(flags.go:23), andpflagValueas a wrapper around*pflag.flagwhile the field isflag *pflag.Flag(flags.go:36). Both comments now name the real types. Comment text only; no code changed.What problem does it solve?:
There is no
pflag.ValueSetin the pinned dependency —go.mod:12requiresgithub.com/spf13/pflag v1.0.10, which exportsFlagSet,Flag,ValueandSliceValue, and searching it fortype ValueSetturns up nothing. The only way a caller obtains apflagValueSetis throughBindPFlags(flags *pflag.FlagSet)(viper.go:1087,viper.go:1091), which wraps the FlagSet, andVisitAlliterates it asp.flags.VisitAll(func(flag *pflag.Flag) …)(flags.go:27-31). So the comment points readers at a type they cannot find, one line above the type that is actually used.Special notes:
gofmtis unaffected: line comments only, no struct tags or alignment touched.go build ./...,go vet ./...orgo test ./...— this environment's shell sandbox refused all toolchain commands, so CI is the first real run. The claim is settled statically by readingflags.go:20-37againstviper.go:1087-1092and the vendored pflagv1.0.10.