• Russ Cox's avatar
    cmd/go: add GOPRIVATE environment variable · 82cf8bca
    Russ Cox authored
    It is too confusing to have to set GONOSUMDB and GONOPROXY
    in common use cases, but one cannot be guaranteed to be a
    subset of the other.
    
    This CL adds GOPRIVATE, which takes the same kind of pattern list
    but is defined as "these patterns are private (non-public) modules".
    Today the implication is that GOPRIVATE is the default setting for
    GONOSUMDB and GONOPROXY. If there are other accommodations
    to make for private packages in the future or in other tools,
    having this clear statement of intent will let us do that.
    (For example maybe an IDE integration would hyperlink an import
    path to godoc.org; consulting GOPRIVATE would be a reasonable
    way to decide not to do that for certain imports. In contrast,
    consulting GONOPROXY or GONOSUMDB clearly would not.)
    
    Fixes #32184.
    
    Change-Id: If54c12d353c7a0a5c0e0273764140cce3c154a02
    Reviewed-on: https://go-review.googlesource.com/c/go/+/181719
    Run-TryBot: Russ Cox <rsc@golang.org>
    Reviewed-by: default avatarBryan C. Mills <bcmills@google.com>
    Reviewed-by: default avatarJay Conrod <jayconrod@google.com>
    TryBot-Result: Gobot Gobot <gobot@golang.org>
    82cf8bca
script_test.go 32.2 KB