mirror of
https://github.com/golang/go
synced 2024-11-23 07:30:05 -07:00
Improve message clarity.
This commit is contained in:
parent
34e9376cdd
commit
a9ebe21fe0
@ -130,7 +130,7 @@ func runGet(ctx context.Context, cmd *base.Command, args []string) {
|
||||
base.Fatalf("go get: cannot use -f flag without -u")
|
||||
}
|
||||
if cfg.Insecure {
|
||||
fmt.Fprintf(os.Stderr, "go get: -insecure flag is deprecated; see go help get for details\n")
|
||||
fmt.Fprintf(os.Stderr, "go get: -insecure flag is deprecated; see 'go help get' for details\n")
|
||||
}
|
||||
|
||||
// Disable any prompting for passwords by Git.
|
||||
|
@ -282,7 +282,7 @@ func runGet(ctx context.Context, cmd *base.Command, args []string) {
|
||||
base.Fatalf("go get: -m flag is no longer supported; consider -d to skip building packages")
|
||||
}
|
||||
if cfg.Insecure {
|
||||
fmt.Fprintf(os.Stderr, "go get: -insecure flag is deprecated; see go help get for details\n")
|
||||
fmt.Fprintf(os.Stderr, "go get: -insecure flag is deprecated; see 'go help get' for details\n")
|
||||
}
|
||||
modload.LoadTests = *getT
|
||||
|
||||
|
@ -3,19 +3,19 @@ env GO111MODULE=off
|
||||
|
||||
# GOPATH: Fetch without insecure, no warning
|
||||
! go get test
|
||||
! stderr 'go get: -insecure flag is deprecated; see go help get for details'
|
||||
! stderr 'go get: -insecure flag is deprecated; see ''go help get'' for details'
|
||||
|
||||
# GOPATH: Fetch with insecure, should warn
|
||||
! go get -insecure test
|
||||
stderr 'go get: -insecure flag is deprecated; see go help get for details'
|
||||
stderr 'go get: -insecure flag is deprecated; see ''go help get'' for details'
|
||||
|
||||
# Modules: Set up
|
||||
env GO111MODULE=on
|
||||
|
||||
# Modules: Fetch without insecure, no warning
|
||||
! go get test
|
||||
! stderr 'go get: -insecure flag is deprecated; see go help get for details'
|
||||
! stderr 'go get: -insecure flag is deprecated; see ''go help get'' for details'
|
||||
|
||||
# Modules: Fetch with insecure, should warn
|
||||
! go get -insecure test
|
||||
stderr 'go get: -insecure flag is deprecated; see go help get for details'
|
||||
stderr 'go get: -insecure flag is deprecated; see ''go help get'' for details'
|
||||
|
Loading…
Reference in New Issue
Block a user