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

Fix lint errors #5

Open
2 tasks
huoqifeng opened this issue Sep 28, 2023 · 0 comments
Open
2 tasks

Fix lint errors #5

huoqifeng opened this issue Sep 28, 2023 · 0 comments

Comments

@huoqifeng
Copy link

huoqifeng commented Sep 28, 2023

Fix the golangci-lint errors in https://github.com/zhmcclient/golang-zhmcclient/actions/runs/6333842494/job/17202544924, as below:

run golangci-lint
Running [/home/runner/golangci-lint-1.54.2-linux-amd64/golangci-lint run --out-format=colored-line-number,github-actions] in [] ...
Error: pkg/zhmcclient/client.go:370:10: Error return value of c.Logon is not checked (errcheck)
c.Logon()
^
Error: pkg/zhmcclient/client.go:371:18: Error return value of c.executeUpload is not checked (errcheck)
c.executeUpload(requestType, url.String(), requestData)
^
Error: pkg/zhmcclient/client.go:403:10: Error return value of c.Logon is not checked (errcheck)
c.Logon()
^
pkg/zhmcclient/client.go:1: File is not gofmt-ed with -s (gofmt)

Error: sample.go:401:6: ineffectual assignment to processorMode (ineffassign)
var processorMode zhmcclient.PartitionProcessorMode = ""
^
Error: pkg/zhmcclient/model.go:24:2: SA9004: only the first constant in this group has an explicit type (staticcheck)
ADAPTER_FAMILY_HIPERSOCKET AdapterFamily = "hipersockets"
^
Error: pkg/zhmcclient/model.go:35:2: SA9004: only the first constant in this group has an explicit type (staticcheck)
ADAPTER_TYPE_CRYPTO AdapterType = "crypto"
^
Error: SA9004: only the first constant in this group has an explicit type (staticcheck)
Error: SA9004: only the first constant in this group has an explicit type (staticcheck)
Error: SA9004: only the first constant in this group has an explicit type (staticcheck)
Error: SA9004: only the first constant in this group has an explicit type (staticcheck)
Error: SA9004: only the first constant in this group has an explicit type (staticcheck)
Error: SA9004: only the first constant in this group has an explicit type (staticcheck)
Error: SA9004: only the first constant in this group has an explicit type (staticcheck)
Error: SA9004: only the first constant in this group has an explicit type (staticcheck)
Error: SA9004: only the first constant in this group has an explicit type (staticcheck)
Error: SA9004: only the first constant in this group has an explicit type (staticcheck)
Error: SA9004: only the first constant in this group has an explicit type (staticcheck)
Error: SA9004: only the first constant in this group has an explicit type (staticcheck)
Error: SA9004: only the first constant in this group has an explicit type (staticcheck)
Error: SA9004: only the first constant in this group has an explicit type (staticcheck)
Error: SA9004: only the first constant in this group has an explicit type (staticcheck)
Error: SA9004: only the first constant in this group has an explicit type (staticcheck)
Error: SA9004: only the first constant in this group has an explicit type (staticcheck)
Error: SA9004: only the first constant in this group has an explicit type (staticcheck)
Error: SA9004: only the first constant in this group has an explicit type (staticcheck)
Error: SA9004: only the first constant in this group has an explicit type (staticcheck)
Error: SA9004: only the first constant in this group has an explicit type (staticcheck)
Error: SA9004: only the first constant in this group has an explicit type (staticcheck)
Error: SA9004: only the first constant in this group has an explicit type (staticcheck)
Error: SA9004: only the first constant in this group has an explicit type (staticcheck)
Error: SA9004: only the first constant in this group has an explicit type (staticcheck)
Error: SA9004: only the first constant in this group has an explicit type (staticcheck)
Error: SA9004: only the first constant in this group has an explicit type (staticcheck)
Error: SA9004: only the first constant in this group has an explicit type (staticcheck)
Error: SA9004: only the first constant in this group has an explicit type (staticcheck)
Error: SA9004: only the first constant in this group has an explicit type (staticcheck)
Error: SA1019: "io/ioutil" has been deprecated since Go 1.19: As of Go 1.16, the same functionality is now provided by package io or package os, and those implementations should be preferred in new code. See the specific function documentation for details. (staticcheck)

Error: issues found
Ran golangci-lint in 3663ms

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant