diff options
| author | Joe Richey joerichey@google.com <joerichey@google.com> | 2018-08-30 02:24:33 -0700 |
|---|---|---|
| committer | Joe Richey joerichey@google.com <joerichey@google.com> | 2018-08-30 02:24:33 -0700 |
| commit | 630c8d1d002286cc26bafec78a7f120b5c0e78af (patch) | |
| tree | 5d453c5b099a2881c74ac49922eb968e235bedfd /vendor/github.com/kisielk/gotool/internal/load/path.go | |
| parent | b7f5b0ab3c9b1af9397c557e410473119399f8b6 (diff) | |
Update dependancies to lastest version
Diffstat (limited to 'vendor/github.com/kisielk/gotool/internal/load/path.go')
| -rw-r--r-- | vendor/github.com/kisielk/gotool/internal/load/path.go | 27 |
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 - } -} |