mirror of
https://github.com/golang/go.git
synced 2025-05-05 15:43:04 +00:00
imports: improve VendorlessPath docs
Eliminate Latin, lest someone complain "it's Greek to me". This work supported by Sourcegraph, though perhaps not the commit message. Change-Id: Ia44eaf5bc5adb6624b590c9cfdfe8083d1414a2c Reviewed-on: https://go-review.googlesource.com/108937 Run-TryBot: Josh Bleecher Snyder <josharian@gmail.com> TryBot-Result: Gobot Gobot <gobot@golang.org> Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org>
This commit is contained in:
parent
81527693ec
commit
c1def519f0
@ -683,8 +683,8 @@ func scanGoDirs(goRoot bool) {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
// VendorlessPath returns the devendorized version of the provided import path.
|
// VendorlessPath returns the devendorized version of the import path ipath.
|
||||||
// e.g. "foo/bar/vendor/a/b" => "a/b"
|
// For example, VendorlessPath("foo/bar/vendor/a/b") returns "a/b".
|
||||||
func VendorlessPath(ipath string) string {
|
func VendorlessPath(ipath string) string {
|
||||||
// Devendorize for use in import statement.
|
// Devendorize for use in import statement.
|
||||||
if i := strings.LastIndex(ipath, "/vendor/"); i >= 0 {
|
if i := strings.LastIndex(ipath, "/vendor/"); i >= 0 {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user