From 87beecd6dfd3b12ed30785ec502f7380dc79ec29 Mon Sep 17 00:00:00 2001 From: Jordan Liggitt Date: Sat, 27 Feb 2021 23:06:23 -0500 Subject: [PATCH] cmd/go: add missing newline to retraction warning message Fixes #44674 Change-Id: Icbdb79084bf7bd2f52cc0a53abcc1ec6f0c4a1bf Reviewed-on: https://go-review.googlesource.com/c/go/+/297350 Reviewed-by: Bryan C. Mills Reviewed-by: Jay Conrod Run-TryBot: Bryan C. Mills TryBot-Result: Go Bot Trust: Jay Conrod --- src/cmd/go/internal/modget/get.go | 2 +- src/cmd/go/testdata/script/mod_get_retract.txt | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/cmd/go/internal/modget/get.go b/src/cmd/go/internal/modget/get.go index 6b328d8bc82..971c5a8d8a8 100644 --- a/src/cmd/go/internal/modget/get.go +++ b/src/cmd/go/internal/modget/get.go @@ -1530,7 +1530,7 @@ func (r *resolver) checkPackagesAndRetractions(ctx context.Context, pkgPatterns } } if retractPath != "" { - fmt.Fprintf(os.Stderr, "go: to switch to the latest unretracted version, run:\n\tgo get %s@latest", retractPath) + fmt.Fprintf(os.Stderr, "go: to switch to the latest unretracted version, run:\n\tgo get %s@latest\n", retractPath) } } diff --git a/src/cmd/go/testdata/script/mod_get_retract.txt b/src/cmd/go/testdata/script/mod_get_retract.txt index fe0ac886295..560fa7bfb25 100644 --- a/src/cmd/go/testdata/script/mod_get_retract.txt +++ b/src/cmd/go/testdata/script/mod_get_retract.txt @@ -11,7 +11,7 @@ cp go.mod.orig go.mod go mod edit -require example.com/retract/self/prev@v1.9.0 go get -d example.com/retract/self/prev stderr '^go: warning: example.com/retract/self/prev@v1.9.0: retracted by module author: self$' -stderr '^go: to switch to the latest unretracted version, run:\n\tgo get example.com/retract/self/prev@latest$' +stderr '^go: to switch to the latest unretracted version, run:\n\tgo get example.com/retract/self/prev@latest\n$' go list -m example.com/retract/self/prev stdout '^example.com/retract/self/prev v1.9.0$'