1
0
mirror of https://github.com/golang/go synced 2024-11-23 07:30:05 -07:00

Improve message clarity.

This commit is contained in:
witchard 2020-09-21 19:57:47 +01:00
parent 34e9376cdd
commit a9ebe21fe0
3 changed files with 6 additions and 6 deletions

View File

@ -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.

View File

@ -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

View File

@ -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'