pflag icon indicating copy to clipboard operation
pflag copied to clipboard

Incorporate minor updates from the standard library

Open djdv opened this issue 2 years ago • 0 comments

While reading the source for this pkg, I noticed the usage of bytes.Buffer in places where Go 1.10's strings.Builder could be used instead. (It's intended for this and is marginally more performant by avoiding some copies internally)

While migrating over, I found a handful of other small linting changes that seem acceptable. All that is included here, but anything can be dropped if it's not desired.

I don't expect this to change any of observable behavior and the tests pass, but who knows.

>go test .\...
ok      github.com/spf13/pflag  0.041s

djdv avatar Jun 27 '22 19:06 djdv