pflag
pflag copied to clipboard
"./flag_test.go:1242:3: fmt.Println arg list ends with redundant newline" with go >= 1.18
I get a test failure with go 1.19.4 (amd64):
# github.com/spf13/pflag
./flag_test.go:1242:3: fmt.Println arg list ends with redundant newline
FAIL github.com/spf13/pflag [build failed]
The behaviour changed in 1.18 https://github.com/golang/go/issues/57059
Changing the line to fmt.Print("\n" + defaultOutput + "\n")
fixes it.