From 748d681d8e66fe8049e2d5d9fa58b8e682dba529 Mon Sep 17 00:00:00 2001 From: matheusalcantarazup <84723211+matheusalcantarazup@users.noreply.github.com> Date: Fri, 11 Mar 2022 08:00:18 -0300 Subject: [PATCH] utils/file:fix - missing {HORUSEC_CLI} prefix and typo on log debug (#1025) Signed-off-by: Matheus Alcantara (cherry picked from commit dcdcdf877362342ef5302bf45ae558fbd012ae6e) --- internal/utils/file/file.go | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/internal/utils/file/file.go b/internal/utils/file/file.go index 15e181543..3cfc98f42 100644 --- a/internal/utils/file/file.go +++ b/internal/utils/file/file.go @@ -69,7 +69,7 @@ func GetPathFromFilename(filename, basePath string) (string, error) { // filename, otherwise will return an empty string. func GetSubPathByFilename(projectPath, subPath, filename string) (string, error) { pathToWalk := joinProjectPathWithSubPath(projectPath, subPath) - logger.LogDebugWithLevel(fmt.Sprintf("Seaching for files with %s name on %s", filename, pathToWalk)) + logger.LogDebugWithLevel(fmt.Sprintf("{HORUSEC_CLI} Searching for files with %s name on %s", filename, pathToWalk)) if path, err := GetPathFromFilename(filename, pathToWalk); path != "" { logger.LogDebugWithLevel(fmt.Sprintf("Found file %s on %s", filename, path)) @@ -86,7 +86,7 @@ func GetSubPathByFilename(projectPath, subPath, filename string) (string, error) // nolint: funlen,gocyclo func GetSubPathByExtension(projectPath, subPath, ext string) (extensionPath string) { pathToWalk := joinProjectPathWithSubPath(projectPath, subPath) - logger.LogDebugWithLevel(fmt.Sprintf("Seaching for files with %s extension on %s", ext, pathToWalk)) + logger.LogDebugWithLevel(fmt.Sprintf("{HORUSEC_CLI} Searching for files with %s extension on %s", ext, pathToWalk)) err := filepath.Walk(pathToWalk, func(path string, info os.FileInfo, err error) error { if err != nil {