mirror of
https://github.com/golang/go
synced 2024-11-18 18:44:42 -07:00
x/tools/go/buildutil: remove unused function
Found with honnef.co/go/tools/cmd/unused. Change-Id: I1dc8e4dbfd784bb22b2f0dabb7c1a08cf1ef44ee Reviewed-on: https://go-review.googlesource.com/37603 Reviewed-by: Alan Donovan <adonovan@google.com>
This commit is contained in:
parent
fd9cb7c10f
commit
76c38d6bce
@ -15,7 +15,6 @@ import (
|
||||
"os"
|
||||
"path"
|
||||
"path/filepath"
|
||||
"runtime"
|
||||
"strings"
|
||||
)
|
||||
|
||||
@ -79,14 +78,6 @@ func ContainingPackage(ctxt *build.Context, dir, filename string) (*build.Packag
|
||||
return nil, fmt.Errorf("can't find package containing %s", filename)
|
||||
}
|
||||
|
||||
// dirHasPrefix tests whether the directory dir begins with prefix.
|
||||
func dirHasPrefix(dir, prefix string) bool {
|
||||
if runtime.GOOS != "windows" {
|
||||
return strings.HasPrefix(dir, prefix)
|
||||
}
|
||||
return len(dir) >= len(prefix) && strings.EqualFold(dir[:len(prefix)], prefix)
|
||||
}
|
||||
|
||||
// -- Effective methods of file system interface -------------------------
|
||||
|
||||
// (go/build.Context defines these as methods, but does not export them.)
|
||||
|
Loading…
Reference in New Issue
Block a user