pflag
pflag copied to clipboard
Drop-in replacement for Go's flag package, implementing POSIX/GNU-style --flags.
last commit 3 years ago and seems to be some bugs. especially printing `pflag help` when opening the help page. is this still maintained or is there a fork to...
https://pkg.go.dev/flag#FlagSet.BoolFunc This seems to be missing. Isn't it supposed to be there for the drop-in replacement :/
Feel free to change my wording. This is just a hint, that this can be very confusing.
PS C:\Users\moradae\GolandProjects\nesd> go get github.com/spf13/pflag PS C:\Users\moradae\GolandProjects\nesd> go test github.com/spf13/pflag # github.com/spf13/pflag # [github.com/spf13/pflag] D:\go\pkg\mod\github.com\spf13\[email protected]\flag_test.go:1221:3: fmt.Println arg list ends with redundant newline FAIL github.com/spf13/pflag [build failed] FAIL my go version...
* add a new abbreviation generator (abbrev.go) with tests * teach flag.go to build an abbrev table for long args and look it up and add tests to verify new...
The `TestSetOutput` test is silently failing since #144. ``` === RUN TestSetOutput --- PASS: TestSetOutput (0.00s) flag_test.go:853: expected output mentioning unknown; got "" ``` This PR should fix that.
Support URLs as a native Flag type. This can be achieved using the [url.URL](https://pkg.go.dev/net/url#URL) package.
Quoting from the documentation of `func StringToStringVar`: > The value of each argument will not try to be separated by comma. However with the following program: ```go res := make(map[string]string)...
Hi! I guess it's time for `v1.0.6`. I have very specific patch in mind: in most of my `pflag` usage patterns it's pretty unusable without #220, namely without `flag`-compatible `Output`....