aboutsummaryrefslogtreecommitdiff
path: root/vendor/github.com/kisielk/gotool/internal/load/path.go
diff options
context:
space:
mode:
authorJoseph Richey <joerichey@google.com>2018-08-30 13:41:49 -0700
committerGitHub <noreply@github.com>2018-08-30 13:41:49 -0700
commit0f451a722918f39fa07bd9337e4a14ca154b13ae (patch)
tree9868ffed8cb74357a06e63b88c56d71b13b415af /vendor/github.com/kisielk/gotool/internal/load/path.go
parent1e1b67dae6c3ae3b5acb5ce377b01b286c3e676b (diff)
parent1c9bafdec78b8f238a82314b6d9c566a951486c2 (diff)
Merge pull request #107 from google/mod
Use Go Modules and support Go 1.11 building
Diffstat (limited to 'vendor/github.com/kisielk/gotool/internal/load/path.go')
-rw-r--r--vendor/github.com/kisielk/gotool/internal/load/path.go27
1 files changed, 0 insertions, 27 deletions
diff --git a/vendor/github.com/kisielk/gotool/internal/load/path.go b/vendor/github.com/kisielk/gotool/internal/load/path.go
deleted file mode 100644
index 74e15b9..0000000
--- a/vendor/github.com/kisielk/gotool/internal/load/path.go
+++ /dev/null
@@ -1,27 +0,0 @@
-// Copyright 2017 The Go Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style
-// license that can be found in the LICENSE file.
-
-// +build go1.9
-
-package load
-
-import (
- "strings"
-)
-
-// hasPathPrefix reports whether the path s begins with the
-// elements in prefix.
-func hasPathPrefix(s, prefix string) bool {
- switch {
- default:
- return false
- case len(s) == len(prefix):
- return s == prefix
- case len(s) > len(prefix):
- if prefix != "" && prefix[len(prefix)-1] == '/' {
- return strings.HasPrefix(s, prefix)
- }
- return s[len(prefix)] == '/' && s[:len(prefix)] == prefix
- }
-}