Skip to content

Commit 5b52022

Browse files
author
André Eriksson
committed
Support resolving with Go modules
1 parent 27fd766 commit 5b52022

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

pkg/util/caller/resolver.go

+2-1
Original file line numberDiff line numberDiff line change
@@ -72,7 +72,8 @@ var defaultRE = func() *regexp.Regexp {
7272
// creates packages inside of a "src" directory within their GOPATH.
7373
return regexp.MustCompile(".*" + qSep + "src" + pkgStrip)
7474
}
75-
if !strings.HasSuffix(root, sep+"src") && !strings.HasSuffix(root, sep+"vendor") {
75+
if !strings.HasSuffix(root, sep+"src") && !strings.HasSuffix(root, sep+"vendor") &&
76+
!strings.HasSuffix(root, sep+"pkg/mod") {
7677
panic("unable to find base path for default call resolver, got " + root)
7778
}
7879
return regexp.MustCompile(regexp.QuoteMeta(root) + pkgStrip)

0 commit comments

Comments
 (0)