Idiomatic Go input parsing with subcommands, positional values, and flags at any position. No required project or package layout and no external dependencies.
Currently if passed flag has bad value the parsing error is silenced.
In this case flag variable dont changed and saves original default value.
func main() {
var intFlag = 123456
flaggy.Int(&intFlag, "f", "flag", "A test string flag")
flaggy.Parse()
// go run main.go --flag abc
print(intFlag) // 123456
}
I think this behavior is strange and triggers wrong software behavior.
Hello!
Currently if passed flag has bad value the parsing error is silenced. In this case flag variable dont changed and saves original default value.
I think this behavior is strange and triggers wrong software behavior.
What do you think about this?