Skip to content
This repository has been archived by the owner on Jul 25, 2022. It is now read-only.

fix golangci-lint check error #438

Merged
merged 2 commits into from
Nov 18, 2020

Conversation

neo-liang-sap
Copy link
Contributor

What this PR does / why we need it:
fix golangci-lint check error
Which issue(s) this PR fixes:
Fixes #434

Special notes for your reviewer:

Release note:

fix some golangci-lint check error

@neo-liang-sap neo-liang-sap requested a review from a team as a code owner November 12, 2020 00:50
@gardener-robot gardener-robot added needs/review Needs review size/xs Size of pull request is tiny (see gardener-robot robot/bots/size.py) labels Nov 12, 2020
@gardener-robot-ci-2 gardener-robot-ci-2 added reviewed/ok-to-test Has approval for testing (check PR in detail before setting this label because PR is run on CI/CD) needs/ok-to-test Needs approval for testing (check PR in detail before setting this label because PR is run on CI/CD) and removed reviewed/ok-to-test Has approval for testing (check PR in detail before setting this label because PR is run on CI/CD) labels Nov 12, 2020
@dansible
Copy link
Contributor

dansible commented Nov 12, 2020

Thanks Neo 👍 This solves the original linting issues but it seems we have a few more from running the check:

pkg/cmd/info.go:86:4: S1038: should use fmt.Fprintf instead of fmt.Fprintln(fmt.Sprintf(...)) (but don't forget the newline) (gosimple)
			fmt.Fprintln(w, fmt.Sprintf("%s\t%s\t%s\t%s", "----", "-----", "------", "----------"))
			^
pkg/cmd/info.go:87:4: S1038: should use fmt.Fprintf instead of fmt.Fprintln(fmt.Sprintf(...)) (but don't forget the newline) (gosimple)
			fmt.Fprintln(w, fmt.Sprintf("%s\t%d\t%d\t%d", "TOTAL", len(shootList.Items), len(shootList.Items)-hibernatedShootsCount-unscheduled, hibernatedShootsCount))
			^
pkg/cmd/info.go:88:4: S1038: should use fmt.Fprintf instead of fmt.Fprintln(fmt.Sprintf(...)) (but don't forget the newline) (gosimple)
			fmt.Fprintln(w, fmt.Sprintf("%s\t%d", "Unscheduled", unscheduled))

Do you want to address them with this issue/PR or open a new one for these?

@neo-liang-sap
Copy link
Contributor Author

i will fix these issues together in this PR - thanks for pointing out!
-Neo

@gardener-robot-ci-1 gardener-robot-ci-1 added the reviewed/ok-to-test Has approval for testing (check PR in detail before setting this label because PR is run on CI/CD) label Nov 13, 2020
@neo-liang-sap neo-liang-sap merged commit 7cd336c into gardener-attic:master Nov 18, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
needs/ok-to-test Needs approval for testing (check PR in detail before setting this label because PR is run on CI/CD) needs/review Needs review reviewed/ok-to-test Has approval for testing (check PR in detail before setting this label because PR is run on CI/CD) size/xs Size of pull request is tiny (see gardener-robot robot/bots/size.py)
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Resolve golint recommendations for fmt.Fprintf (S1038)
5 participants