Skip to content

Commit e298c00

Browse files
committed
Modified to use extracted MatchPrefixPatterns function.
1 parent 08657ed commit e298c00

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

src/cmd/go/internal/get/get.go

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,8 @@ import (
2020
"cmd/go/internal/str"
2121
"cmd/go/internal/web"
2222
"cmd/go/internal/work"
23+
24+
"golang.org/x/mod/module"
2325
)
2426

2527
var CmdGet = &base.Command{
@@ -429,7 +431,7 @@ func downloadPackage(p *load.Package) error {
429431
return fmt.Errorf("%s: invalid import path: %v", p.ImportPath, err)
430432
}
431433
security := web.SecureOnly
432-
if Insecure || str.GlobsMatchPath(cfg.GOINSECURE, importPrefix) {
434+
if Insecure || module.MatchPrefixPatterns(cfg.GOINSECURE, importPrefix) {
433435
security = web.Insecure
434436
}
435437

0 commit comments

Comments
 (0)