Skip to content

Commit

Permalink
internal/scan: remove obsolete function
Browse files Browse the repository at this point in the history
Removes the "fileExists" function which is no longer used.

Fixes golang/go#63967

Change-Id: I7ac9eb5537f4419c22774a43ba955d2191c2fe84
Reviewed-on: https://go-review.googlesource.com/c/vuln/+/540195
LUCI-TryBot-Result: Go LUCI <[email protected]>
Auto-Submit: Maceo Thompson <[email protected]>
Reviewed-by: Zvonimir Pavlinovic <[email protected]>
  • Loading branch information
Maceo Thompson authored and gopherbot committed Nov 6, 2023
1 parent 95059e5 commit 494f7b9
Showing 1 changed file with 0 additions and 15 deletions.
15 changes: 0 additions & 15 deletions internal/scan/flags.go
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,6 @@
package scan

import (
"errors"
"flag"
"fmt"
"io"
Expand Down Expand Up @@ -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 {
Expand Down

0 comments on commit 494f7b9

Please sign in to comment.