Skip to content

Commit

Permalink
Modified to use extracted MatchPrefixPatterns function.
Browse files Browse the repository at this point in the history
  • Loading branch information
witchard committed Aug 30, 2020
1 parent 08657ed commit e298c00
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion src/cmd/go/internal/get/get.go
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,8 @@ import (
"cmd/go/internal/str"
"cmd/go/internal/web"
"cmd/go/internal/work"

"golang.org/x/mod/module"
)

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

Expand Down

0 comments on commit e298c00

Please sign in to comment.