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

golangci-lint: add wastedassign & update code #5743

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions .golangci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,7 @@ linters:
- unparam
- whitespace
- gocritic
- wastedassign
- nolintlint

linters-settings:
Expand Down
2 changes: 1 addition & 1 deletion pkg/agent/plugin/workloadattestor/k8s/k8s_posix.go
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ func createHelper(c *Plugin) ContainerHelper {
rootDir = "/"
}
return &containerHelper{
rootDir: c.rootDir,
rootDir: rootDir,
}
}

Expand Down
2 changes: 1 addition & 1 deletion pkg/server/plugin/upstreamauthority/ejbca/ejbca.go
Original file line number Diff line number Diff line change
Expand Up @@ -358,7 +358,7 @@ func (p *Plugin) setClient(client ejbcaClient) {
func (p *Plugin) getEndEntityName(config *Config, csr *x509.CertificateRequest) (string, error) {
logger := p.logger.Named("getEndEntityName")

eeName := ""
var eeName string
// 1. If the endEntityName option is set, determine the end entity name based on the option
// 2. If the endEntityName option is not set, determine the end entity name based on the CSR

Expand Down
2 changes: 1 addition & 1 deletion pkg/server/plugin/upstreamauthority/vault/vault_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -179,7 +179,7 @@ func TestConfigure(t *testing.T) {
return v, ok
}

plainConfig := ""
var plainConfig string
if tt.plainConfig != "" {
plainConfig = tt.plainConfig
} else {
Expand Down
Loading