mirror of
https://github.com/securego/gosec.git
synced 2024-12-26 04:25:52 +00:00
Fix gosimple lint warning (#651)
Signed-off-by: Cosmin Cojocar <ccojocar@cloudbees.com>
This commit is contained in:
parent
731d0d51ce
commit
df10b65136
1 changed files with 1 additions and 3 deletions
|
@ -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)
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue