Skip to content

Commit

Permalink
remove comment
Browse files Browse the repository at this point in the history
change errorf from %v to %s
  • Loading branch information
mcarbonneaux committed Dec 20, 2024
1 parent fcb5d79 commit 4b0cdad
Showing 1 changed file with 1 addition and 5 deletions.
6 changes: 1 addition & 5 deletions pkg/transformer/kubernetes/k8sutils.go
Original file line number Diff line number Diff line change
Expand Up @@ -1266,25 +1266,21 @@ func isConfigFile(filePath string) (useConfigMap bool, readonly bool, skip bool)
func checkIsEmptyDir(filePath string) (bool, error) {
files, err := os.ReadDir(filePath)
if err != nil {
log.Errorf("ReadDir of %v failed !", filePath)
log.Errorf("ReadDir of %s failed !", filePath)
return false, err
}
if len(files) == 0 {
// is empty
return true, err
}
for _, file := range files {
if !file.IsDir() {
// not empty
return false, nil
}
// recurse directory
_, err := checkIsEmptyDir(filepath.Join(filePath, file.Name()))
if err != nil {
return false, err
}
}
// is empty
return true, nil
}

Expand Down

0 comments on commit 4b0cdad

Please sign in to comment.