зеркало из https://github.com/golang/vuln.git
internal/scan: remove obsolete function
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 <golang-scoped@luci-project-accounts.iam.gserviceaccount.com> Auto-Submit: Maceo Thompson <maceothompson@google.com> Reviewed-by: Zvonimir Pavlinovic <zpavlinovic@google.com>
This commit is contained in:
Родитель
95059e5917
Коммит
494f7b9de9
|
@ -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 {
|
||||
|
|
Загрузка…
Ссылка в новой задаче