1
0
mirror of https://github.com/golang/go synced 2024-11-15 08:00:44 -07:00

internal/trace/v2: fix reader version for dumping text output

There was recently a failure that we don't have a trace dump for because
the reader was passed Go122 but traces have moved onto version Go123.
Use version.Current to prevent this from happening again in the future.

Change-Id: I4f8b3c3ea5bad61a07839a697cd5d7793d62ea52
Reviewed-on: https://go-review.googlesource.com/c/go/+/574216
LUCI-TryBot-Result: Go LUCI <golang-scoped@luci-project-accounts.iam.gserviceaccount.com>
Reviewed-by: Carlos Amedee <carlos@golang.org>
This commit is contained in:
Michael Anthony Knyszek 2024-03-25 17:00:55 +00:00 committed by Michael Knyszek
parent 4c2b1e0feb
commit e7bdc8819a

View File

@ -133,7 +133,7 @@ func dumpTraceToText(t *testing.T, b []byte) string {
t.Fatalf("dumping trace: %v", err) t.Fatalf("dumping trace: %v", err)
} }
var sb strings.Builder var sb strings.Builder
tw, err := raw.NewTextWriter(&sb, version.Go122) tw, err := raw.NewTextWriter(&sb, version.Current)
if err != nil { if err != nil {
t.Fatalf("dumping trace: %v", err) t.Fatalf("dumping trace: %v", err)
} }