From cde8290db5c76ed0d67879c18708e5878bf9f630 Mon Sep 17 00:00:00 2001 From: JU4N98 Date: Wed, 25 Oct 2023 10:41:14 -0300 Subject: [PATCH] Fixes lint error. Signed-off-by: JU4N98 --- pkg/sidecar/sidecar.go | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/pkg/sidecar/sidecar.go b/pkg/sidecar/sidecar.go index 7ddc6886..2667c4a1 100644 --- a/pkg/sidecar/sidecar.go +++ b/pkg/sidecar/sidecar.go @@ -189,8 +189,8 @@ func (s *Sidecar) dumpBundles(svidResponse *workloadapi.X509Context) error { return nil } -func (s *Sidecar) readJSON(file_name string) map[string]interface{} { - jsonPath := path.Join(s.config.CertDir, file_name) +func (s *Sidecar) readJSON(fileName string) map[string]interface{} { + jsonPath := path.Join(s.config.CertDir, fileName) file, err := os.ReadFile(jsonPath) if err != nil { s.config.Log.Warnf("Unable to read json file: %v", err) @@ -205,13 +205,13 @@ func (s *Sidecar) readJSON(file_name string) map[string]interface{} { return certs } -func (s *Sidecar) writeJSON(file_name string, certs map[string]interface{}) { +func (s *Sidecar) writeJSON(fileName string, certs map[string]interface{}) { file, err := json.Marshal(certs) if err != nil { s.config.Log.Warnf("Unable to parse certs: %v", err) } - jsonPath := path.Join(s.config.CertDir, file_name) + jsonPath := path.Join(s.config.CertDir, fileName) err = os.WriteFile(jsonPath, file, os.ModePerm) if err != nil { s.config.Log.Warnf("Unable to write JSON file: %v", err)