Skip to content

Commit df10b65

Browse files
authored
Fix gosimple lint warning (#651)
Signed-off-by: Cosmin Cojocar <[email protected]>
1 parent 731d0d5 commit df10b65

File tree

1 file changed

+1
-3
lines changed

1 file changed

+1
-3
lines changed

helpers.go

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -446,8 +446,6 @@ func ExcludedDirsRegExp(excludedDirs []string) []*regexp.Regexp {
446446

447447
// RootPath returns the absolute root path of a scan
448448
func RootPath(root string) (string, error) {
449-
if strings.HasSuffix(root, "...") {
450-
root = root[0 : len(root)-3]
451-
}
449+
root = strings.TrimPrefix(root, "...")
452450
return filepath.Abs(root)
453451
}

0 commit comments

Comments
 (0)