1
0
mirror of https://github.com/golang/go synced 2024-11-18 16:44:43 -07: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:
Josh Bleecher Snyder 2018-04-23 13:21:01 -07:00
parent 81527693ec
commit c1def519f0

View File

@ -683,8 +683,8 @@ func scanGoDirs(goRoot bool) {
}
}
// VendorlessPath returns the devendorized version of the provided import path.
// e.g. "foo/bar/vendor/a/b" => "a/b"
// VendorlessPath returns the devendorized version of the import path ipath.
// For example, VendorlessPath("foo/bar/vendor/a/b") returns "a/b".
func VendorlessPath(ipath string) string {
// Devendorize for use in import statement.
if i := strings.LastIndex(ipath, "/vendor/"); i >= 0 {