diff --git a/pkg/path/os.go b/pkg/path/os.go index f55193977..6eb640d10 100644 --- a/pkg/path/os.go +++ b/pkg/path/os.go @@ -41,7 +41,6 @@ type osInfo interface { splitList(path string) []string volumeNameLen(path string) int IsAbs(path string) (b bool) - HasPrefix(p, prefix string) bool join(elem []string) string sameWord(a, b string) bool } diff --git a/pkg/path/path_nix.go b/pkg/path/path_nix.go index eb1b193af..726f85eae 100644 --- a/pkg/path/path_nix.go +++ b/pkg/path/path_nix.go @@ -44,14 +44,6 @@ func (o unixInfo) volumeNameLen(path string) int { return 0 } -// HasPrefix exists for historical compatibility and should not be used. -// -// Deprecated: HasPrefix does not respect path boundaries and -// does not ignore case when required. -func (o unixInfo) HasPrefix(p, prefix string) bool { - return strings.HasPrefix(p, prefix) -} - func (o unixInfo) splitList(path string) []string { if path == "" { return []string{} diff --git a/pkg/path/path_p9.go b/pkg/path/path_p9.go index f3379ea5f..961539aa0 100644 --- a/pkg/path/path_p9.go +++ b/pkg/path/path_p9.go @@ -42,14 +42,6 @@ func (o plan9Info) volumeNameLen(path string) int { return 0 } -// HasPrefix exists for historical compatibility and should not be used. -// -// Deprecated: HasPrefix does not respect path boundaries and -// does not ignore case when required. -func (o plan9Info) HasPrefix(p, prefix string) bool { - return strings.HasPrefix(p, prefix) -} - func (o plan9Info) splitList(path string) []string { if path == "" { return []string{} diff --git a/pkg/path/path_win.go b/pkg/path/path_win.go index 054ae28aa..d854498d9 100644 --- a/pkg/path/path_win.go +++ b/pkg/path/path_win.go @@ -116,17 +116,6 @@ func (os windowsInfo) volumeNameLen(path string) int { return 0 } -// HasPrefix exists for historical compatibility and should not be used. -// -// Deprecated: HasPrefix does not respect path boundaries and -// does not ignore case when required. -func (os windowsInfo) HasPrefix(p, prefix string) bool { - if strings.HasPrefix(p, prefix) { - return true - } - return strings.HasPrefix(strings.ToLower(p), strings.ToLower(prefix)) -} - func (os windowsInfo) splitList(path string) []string { // The same implementation is used in LookPath in os/exec; // consider changing os/exec when changing this.