aboutsummaryrefslogtreecommitdiff
path: root/src/cmd/go/internal/modfetch/repo.go
diff options
context:
space:
mode:
Diffstat (limited to 'src/cmd/go/internal/modfetch/repo.go')
-rw-r--r--src/cmd/go/internal/modfetch/repo.go4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/cmd/go/internal/modfetch/repo.go b/src/cmd/go/internal/modfetch/repo.go
index af9e24cefd..ed9a52267a 100644
--- a/src/cmd/go/internal/modfetch/repo.go
+++ b/src/cmd/go/internal/modfetch/repo.go
@@ -267,7 +267,7 @@ var (
func lookupDirect(path string) (Repo, error) {
security := web.SecureOnly
- if allowInsecure(path) {
+ if module.MatchPrefixPatterns(cfg.GOINSECURE, path) {
security = web.Insecure
}
rr, err := vcs.RepoRootForImportPath(path, vcs.PreferMod, security)
@@ -312,7 +312,7 @@ func ImportRepoRev(path, rev string) (Repo, *RevInfo, error) {
// version control system, we ignore meta tags about modules
// and use only direct source control entries (get.IgnoreMod).
security := web.SecureOnly
- if allowInsecure(path) {
+ if module.MatchPrefixPatterns(cfg.GOINSECURE, path) {
security = web.Insecure
}
rr, err := vcs.RepoRootForImportPath(path, vcs.IgnoreMod, security)