pflag icon indicating copy to clipboard operation
pflag copied to clipboard

"./flag_test.go:1242:3: fmt.Println arg list ends with redundant newline" with go >= 1.18

Open pterjan opened this issue 2 years ago • 0 comments

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.

pterjan avatar Dec 21 '22 20:12 pterjan