1
0
mirror of https://github.com/securego/gosec.git synced 2025-11-23 22:15:04 +02:00

Fix gosimple lint warning (#651)

Signed-off-by: Cosmin Cojocar <ccojocar@cloudbees.com>
This commit is contained in:
Cosmin Cojocar
2021-06-17 14:39:47 +02:00
committed by GitHub
parent 731d0d51ce
commit df10b65136

View File

@@ -446,8 +446,6 @@ func ExcludedDirsRegExp(excludedDirs []string) []*regexp.Regexp {
// RootPath returns the absolute root path of a scan // RootPath returns the absolute root path of a scan
func RootPath(root string) (string, error) { func RootPath(root string) (string, error) {
if strings.HasSuffix(root, "...") { root = strings.TrimPrefix(root, "...")
root = root[0 : len(root)-3]
}
return filepath.Abs(root) return filepath.Abs(root)
} }