github.com/gagliardetto/golang-go@v0.0.0-20201020153340-53909ea70814/cmd/go/not-internal/modfetch/insecure.go (about) 1 // Copyright 2018 The Go Authors. All rights reserved. 2 // Use of this source code is governed by a BSD-style 3 // license that can be found in the LICENSE file. 4 5 package modfetch 6 7 import ( 8 "github.com/gagliardetto/golang-go/cmd/go/not-internal/cfg" 9 "github.com/gagliardetto/golang-go/cmd/go/not-internal/get" 10 "github.com/gagliardetto/golang-go/cmd/go/not-internal/str" 11 ) 12 13 // allowInsecure reports whether we are allowed to fetch this path in an insecure manner. 14 func allowInsecure(path string) bool { 15 return get.Insecure || str.GlobsMatchPath(cfg.GOINSECURE, path) 16 }