Skip to content

Commit

Permalink
utils/file:fix - missing {HORUSEC_CLI} prefix and typo on log debug (#…
Browse files Browse the repository at this point in the history
…1025)

Signed-off-by: Matheus Alcantara <matheus.alcantara@zup.com.br>
(cherry picked from commit dcdcdf8)
  • Loading branch information
matheusalcantarazup authored and nathanmartinszup committed Mar 11, 2022
1 parent 8517c84 commit 748d681
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions internal/utils/file/file.go
Original file line number Diff line number Diff line change
Expand Up @@ -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))
Expand All @@ -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 {
Expand Down

0 comments on commit 748d681

Please sign in to comment.