Skip to content

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

@pterjan

Description

@pterjan

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 golang/go#57059

Changing the line to fmt.Print("\n" + defaultOutput + "\n") fixes it.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions