Skip to content

Commit

Permalink
Fixes lint error.
Browse files Browse the repository at this point in the history
Signed-off-by: JU4N98 <[email protected]>
  • Loading branch information
JU4N98 committed Oct 25, 2023
1 parent e53e6fd commit cde8290
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions pkg/sidecar/sidecar.go
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand All @@ -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)
Expand Down

0 comments on commit cde8290

Please sign in to comment.