1
0
mirror of https://github.com/golang/go synced 2024-11-15 00:30:31 -07:00
Change-Id: I1c826be0e3630cba53ce5515e732460f938f25d8
This commit is contained in:
qiulaidongfeng 2024-04-15 21:16:41 +08:00
parent 9567536651
commit 114b30eb55

View File

@ -135,7 +135,8 @@ func isGoBinaryCandidate(file string, info fs.FileInfo) bool {
// If mustPrint is true, scanFile will report any error reading file.
// Otherwise (mustPrint is false, because scanFile is being called
// by scanDir) scanFile prints nothing for non-Go binaries.
func scanFile(file string, info fs.FileInfo, mustPrint bool) (ok bool) {
// scanFile reports whether the file is a Go binary.
func scanFile(file string, info fs.FileInfo, mustPrint bool) bool {
if info.Mode()&fs.ModeSymlink != 0 {
// Accept file symlinks only.
i, err := os.Stat(file)