kube-bench icon indicating copy to clipboard operation
kube-bench copied to clipboard

`if` statement with identical `then` and `else` branches

Open chavacava opened this issue 3 years ago • 0 comments

https://github.com/aquasecurity/kube-bench/blob/dd39b19ffcd26d27b790916e844e3abf87b4a970/cmd/kubernetes_version_test.go#L267-L275

Could be simplified to just

if k8sURL != c.expected {
	t.Errorf("Expected %q but Got %q", k8sURL, c.expected)
}

?

Found with revive

chavacava avatar Oct 01 '22 05:10 chavacava