spf13 / pflag

Drop-in replacement for Go's flag package, implementing POSIX/GNU-style --flags.
BSD 3-Clause "New" or "Revised" License
2.43k stars 348 forks source link

Fix TestPrintDefaults with go >= 1.18 #369

Open pterjan opened 1 year ago

pterjan commented 1 year ago

It no longer accepts Println with a constant ending with a newline:

Fixes #368

./flag_test.go:1242:3: fmt.Println arg list ends with redundant newline FAIL github.com/spf13/pflag [build failed]

Also changing the previous line ven if it si not constant for consistency.

CLAassistant commented 1 year ago

CLA assistant check
All committers have signed the CLA.