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:
@@ -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)
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user