diff --git a/internal/scan/flags.go b/internal/scan/flags.go index e505dfb1..348c5338 100644 --- a/internal/scan/flags.go +++ b/internal/scan/flags.go @@ -5,7 +5,6 @@ package scan import ( - "errors" "flag" "fmt" "io" @@ -166,20 +165,6 @@ func isFile(path string) bool { return !s.IsDir() } -// fileExists checks if file path exists. Returns true -// if the file exists or it cannot prove that it does -// not exist. Otherwise, returns false. -func fileExists(path string) bool { - if _, err := os.Stat(path); err == nil { - return true - } else if errors.Is(err, os.ErrNotExist) { - return false - } - // Conservatively return true if os.Stat fails - // for some other reason. - return true -} - type showFlag []string func (v *showFlag) Set(s string) error {