fix staticcheck issues

add staticcheck CI action

add staticcheck in Makefile

Signed-off-by: roywang <seiwy2010@gmail.com>
This commit is contained in:
roy wang
2021-01-29 18:42:03 +09:00
committed by roywang
parent af61a81828
commit 93ae8a9099
43 changed files with 136 additions and 115 deletions
@@ -58,7 +58,7 @@ func TestAPIs(t *testing.T) {
}
var _ = BeforeSuite(func(done Done) {
logf.SetLogger(zap.LoggerTo(GinkgoWriter, true))
logf.SetLogger(zap.New(zap.UseDevMode(true), zap.WriteTo(GinkgoWriter)))
By("bootstrapping test environment")
testEnv = &envtest.Environment{
@@ -23,7 +23,7 @@ import (
)
const (
errFmtWorkloadNameNotEmpty = "versioning-enabled component's workload name MUST NOT be assigned, expect workload name %q to be empty."
errFmtWorkloadNameNotEmpty = "versioning-enabled component's workload name MUST NOT be assigned, expect workload name %q to be empty"
errFmtRevisionName = "componentName %q and revisionName %q are mutually exclusive, you can only specify one of them"