Skip to content

Commit 1980517

Browse files
committed
imports: restore VendorlessPath(ipath string)
This appears to have vanished, for some reason, although the underlying implementation remained. Fixes golang/go#75888 Change-Id: I6ec5133a03cfc2e95d52be2907f6f177b9a666f7 Reviewed-on: https://go-review.googlesource.com/c/tools/+/711720 Reviewed-by: Sean Liao <sean@liao.dev> LUCI-TryBot-Result: Go LUCI <golang-scoped@luci-project-accounts.iam.gserviceaccount.com> Reviewed-by: Michael Knyszek <mknyszek@google.com>
1 parent ed067b1 commit 1980517

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

imports/forward.go

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -69,3 +69,9 @@ func Process(filename string, src []byte, opt *Options) ([]byte, error) {
6969
}
7070
return intimp.Process(filename, src, intopt)
7171
}
72+
73+
// VendorlessPath returns the devendorized version of the import path ipath.
74+
// For example, VendorlessPath("foo/barbendor/a/b") return "a/b".
75+
func VendorlessPath(ipath string) string {
76+
return intimp.VendorlessPath(ipath)
77+
}

0 commit comments

Comments
 (0)