• Bryan C. Mills's avatar
    cmd/go: remove the -mod flag from 'go get' · 6145a806
    Bryan C. Mills authored
    'GOFLAGS=-mod=vendor' currently causes 'go get' to always fail unless
    the '-mod' flag is explicitly overwritten. Moreover, as of CL 198319
    we plan to set -mod=vendor by default if a vendor directory is
    present, so all users with vendor directories will be affected — not
    just those who set 'GOFLAGS' explicitly.
    
    Similarly, an explicit '-mod=readonly' argument to 'go get' is
    currently ignored as a special case, but the fact that it is ignored
    (rather than rejected) can be very surprising.
    
    Rather than adding more special cases, we should remove the '-mod'
    flag from 'go get' entirely.
    
    Fixes #30345
    Fixes #32502
    Updates #33848
    
    Change-Id: Iecd3233ca3ef580ca3a66bd5e6ee8d86d4cbd8a7
    Reviewed-on: https://go-review.googlesource.com/c/go/+/198438
    Run-TryBot: Bryan C. Mills <bcmills@google.com>
    TryBot-Result: Gobot Gobot <gobot@golang.org>
    Reviewed-by: default avatarJay Conrod <jayconrod@google.com>
    6145a806
go1.14.html 4.17 KB