diff --git a/Makefile b/Makefile index 3c380b8d..0935fdda 100644 --- a/Makefile +++ b/Makefile @@ -100,7 +100,7 @@ else endif go_path := PATH="$(go_bin_dir):$(PATH)" -golangci_lint_version = v1.51.1 +golangci_lint_version = v1.52.2 golangci_lint_dir = $(build_dir)/golangci_lint/$(golangci_lint_version) golangci_lint_bin = $(golangci_lint_dir)/golangci-lint golangci_lint_cache = $(golangci_lint_dir)/cache diff --git a/pkg/sidecar/sidecar.go b/pkg/sidecar/sidecar.go index 5f39a8d9..5aecd8e7 100644 --- a/pkg/sidecar/sidecar.go +++ b/pkg/sidecar/sidecar.go @@ -261,11 +261,7 @@ func (s *Sidecar) dumpBundles(svidResponse *workloadapi.X509Context) error { return err } - if err := writeCerts(svidBundleFile, bundles); err != nil { - return err - } - - return nil + return writeCerts(svidBundleFile, bundles) } func (s *Sidecar) writeJSON(fileName string, certs map[string]interface{}) error { @@ -275,11 +271,8 @@ func (s *Sidecar) writeJSON(fileName string, certs map[string]interface{}) error } jsonPath := path.Join(s.config.CertDir, fileName) - if err = os.WriteFile(jsonPath, file, os.ModePerm); err != nil { - return err - } - return nil + return os.WriteFile(jsonPath, file, os.ModePerm) } func (s *Sidecar) updateJWTBundle(jwkSet *jwtbundle.Set) { diff --git a/pkg/sidecar/util_posix.go b/pkg/sidecar/util_posix.go index 15cfd5aa..50665947 100644 --- a/pkg/sidecar/util_posix.go +++ b/pkg/sidecar/util_posix.go @@ -33,6 +33,6 @@ func (s *Sidecar) SignalProcess() error { return nil } -func validateOSConfig(c *Config) error { +func validateOSConfig(*Config) error { return nil }