]> Cypherpunks repositories - gostls13.git/commitdiff
cmd/go: remove warning from module deprecation notice printing
authorTim Heckman <t@heckman.io>
Thu, 20 May 2021 23:51:28 +0000 (16:51 -0700)
committerJay Conrod <jayconrod@google.com>
Fri, 21 May 2021 16:51:34 +0000 (16:51 +0000)
Fixes #46294

Change-Id: I50023006dab83dee455f98a702ca1c72e61764ea
Reviewed-on: https://go-review.googlesource.com/c/go/+/321649
Trust: Jay Conrod <jayconrod@google.com>
Trust: Michael Matloob <matloob@golang.org>
Run-TryBot: Jay Conrod <jayconrod@google.com>
TryBot-Result: Go Bot <gobot@golang.org>
Reviewed-by: Jay Conrod <jayconrod@google.com>
src/cmd/go/internal/modget/get.go
src/cmd/go/testdata/script/mod_deprecate_message.txt
src/cmd/go/testdata/script/mod_get_deprecated.txt

index 2a7fe5226fd136ff0077b0228e1a84c0233282c9..563f1a988f08ee3f005b0b23f01d08c47a7060ed 100644 (file)
@@ -1598,7 +1598,7 @@ func (r *resolver) checkPackageProblems(ctx context.Context, pkgPatterns []strin
        // Report deprecations, then retractions.
        for _, mm := range deprecations {
                if mm.message != "" {
-                       fmt.Fprintf(os.Stderr, "go: warning: module %s is deprecated: %s\n", mm.m.Path, mm.message)
+                       fmt.Fprintf(os.Stderr, "go: module %s is deprecated: %s\n", mm.m.Path, mm.message)
                }
        }
        var retractPath string
index 4a0674b80840dafecd3acbc9bdd61ca5c7612e87..567027935dc338c32ec73644c594253b640c3cc6 100644 (file)
@@ -1,26 +1,26 @@
 # When there is a short single-line message, 'go get' should print it all.
 go get -d short
-stderr '^go: warning: module short is deprecated: short$'
+stderr '^go: module short is deprecated: short$'
 go list -m -u -f '{{.Deprecated}}' short
 stdout '^short$'
 
 # When there is a multi-line message, 'go get' should print the first line.
 go get -d multiline
-stderr '^go: warning: module multiline is deprecated: first line$'
+stderr '^go: module multiline is deprecated: first line$'
 ! stderr 'second line'
 go list -m -u -f '{{.Deprecated}}' multiline
 stdout '^first line\nsecond line.$'
 
 # When there is a long message, 'go get' should print a placeholder.
 go get -d long
-stderr '^go: warning: module long is deprecated: \(message omitted: too long\)$'
+stderr '^go: module long is deprecated: \(message omitted: too long\)$'
 go list -m -u -f '{{.Deprecated}}' long
 stdout '^aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa$'
 
 # When a message contains unprintable chracters, 'go get' should say that
 # without printing the message.
 go get -d unprintable
-stderr '^go: warning: module unprintable is deprecated: \(message omitted: contains non-printable characters\)$'
+stderr '^go: module unprintable is deprecated: \(message omitted: contains non-printable characters\)$'
 go list -m -u -f '{{.Deprecated}}' unprintable
 stdout '^message contains ASCII BEL\x07$'
 
index 4633009f69b26d2e3b688e86d17348e6f073f363..7bdd7a58a89b5d15c43520055daf3eb7b4c1d8f8 100644 (file)
@@ -4,14 +4,14 @@ go get -d ./use/nothing
 
 # 'go get pkg' should show a deprecation message for the module providing pkg.
 go get -d example.com/deprecated/a
-stderr '^go: warning: module example.com/deprecated/a is deprecated: in example.com/deprecated/a@v1.9.0$'
+stderr '^go: module example.com/deprecated/a is deprecated: in example.com/deprecated/a@v1.9.0$'
 go get -d example.com/deprecated/a@v1.0.0
-stderr '^go: warning: module example.com/deprecated/a is deprecated: in example.com/deprecated/a@v1.9.0$'
+stderr '^go: module example.com/deprecated/a is deprecated: in example.com/deprecated/a@v1.9.0$'
 
 # 'go get pkg' should show a deprecation message for a module providing
 # packages directly imported by pkg.
 go get -d ./use/a
-stderr '^go: warning: module example.com/deprecated/a is deprecated: in example.com/deprecated/a@v1.9.0$'
+stderr '^go: module example.com/deprecated/a is deprecated: in example.com/deprecated/a@v1.9.0$'
 
 # 'go get pkg' may show a deprecation message for an indirectly required module
 # if it provides a package named on the command line.
@@ -20,7 +20,7 @@ go get -d ./use/b
 go get -d local/use
 ! stderr 'module.*is deprecated'
 go get -d example.com/deprecated/b
-stderr '^go: warning: module example.com/deprecated/b is deprecated: in example.com/deprecated/b@v1.9.0$'
+stderr '^go: module example.com/deprecated/b is deprecated: in example.com/deprecated/b@v1.9.0$'
 
 # 'go get pkg' does not show a deprecation message for a module providing a
 # directly imported package if the module is no longer deprecated in its