Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

cmd/snap: make 1.18 vet happy #11532

Merged
merged 1 commit into from
Mar 18, 2022

Conversation

bboozzoo
Copy link
Contributor

Go vet in 1.18 is more picky about fmt.*rintln and additional newlines at the
end of output, thus producing errors like:

./cmd_info_test.go:1197:4: fmt.Fprintln arg list ends with redundant newline
./cmd_info_test.go:1201:4: fmt.Fprintln arg list ends with redundant newline
./cmd_routine_portal_info_test.go:101:4: fmt.Fprintln arg list ends with redundant newline
./cmd_routine_portal_info_test.go:161:4: fmt.Fprintln arg list ends with redundant newline
./cmd_run_test.go:1755:5: fmt.Fprintln arg list ends with redundant newline

See golang/go#49350 and https://go.dev/doc/go1.18#vet
Although I believe we should not be hitting this case, still it does not make
sense to output so many newlines, so it's worth fixing.

Go vet in 1.18 is more picky about fmt.*rintln and additional newlines at the
end of output, thus producing errors like:

./cmd_info_test.go:1197:4: fmt.Fprintln arg list ends with redundant newline
./cmd_info_test.go:1201:4: fmt.Fprintln arg list ends with redundant newline
./cmd_routine_portal_info_test.go:101:4: fmt.Fprintln arg list ends with redundant newline
./cmd_routine_portal_info_test.go:161:4: fmt.Fprintln arg list ends with redundant newline
./cmd_run_test.go:1755:5: fmt.Fprintln arg list ends with redundant newline

See golang/go#49350 and https://go.dev/doc/go1.18#vet
Although I believe we should not be hitting this case, still it does not make
sense to output so many newlines, so it's worth fixing.

Signed-off-by: Maciej Borzecki <maciej.zenon.borzecki@canonical.com>
@bboozzoo bboozzoo added the Simple 😃 A small PR which can be reviewed quickly label Mar 18, 2022
Copy link
Contributor

@mardy mardy left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM!

Copy link
Contributor

@mvo5 mvo5 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thank you

@mvo5 mvo5 added the Skip spread Indicate that spread job should not run label Mar 18, 2022
@mvo5 mvo5 merged commit fec3ee3 into canonical:master Mar 18, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Simple 😃 A small PR which can be reviewed quickly Skip spread Indicate that spread job should not run
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants