Skip to content

Commit 6bf1786

Browse files
committed
Ran go1.19 gofmt -w -s .
It updated line numbers in the change detector. No functional change.
1 parent 0852717 commit 6bf1786

6 files changed

Lines changed: 30 additions & 27 deletions

File tree

cmd/panic/main.go

Lines changed: 9 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -7,17 +7,20 @@
77
// It is a tool to help test pp, it is used in its unit tests.
88
//
99
// To install, run:
10-
// go install github.com/maruel/panicparse/v2/cmd/panic
11-
// panic -help
12-
// panic str |& pp
10+
//
11+
// go install github.com/maruel/panicparse/v2/cmd/panic
12+
// panic -help
13+
// panic str |& pp
1314
//
1415
// Some panics require the race detector with -race:
15-
// go install -race github.com/maruel/panicparse/v2/cmd/panic
16-
// panic race |& pp
16+
//
17+
// go install -race github.com/maruel/panicparse/v2/cmd/panic
18+
// panic race |& pp
1719
//
1820
// To use with optimization (-N) and inlining (-l) disabled, build with
1921
// -gcflags '-N -l' like:
20-
// go install -gcflags '-N -l' github.com/maruel/panicparse/v2/cmd/panic
22+
//
23+
// go install -gcflags '-N -l' github.com/maruel/panicparse/v2/cmd/panic
2124
package main
2225

2326
// To add a new panic stack signature, add it to types type below, keeping the

internal/internaltest/static_panic_race.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,8 +6,8 @@ package internaltest
66

77
// staticPanicRace is a snapshot created with:
88
//
9-
// go install -race github.com/maruel/panicparse/cmd/panic
10-
// panic race |& sed "s#$HOME##g"
9+
// go install -race github.com/maruel/panicparse/cmd/panic
10+
// panic race |& sed "s#$HOME##g"
1111
//
1212
// when installed within $GOPATH.
1313
const staticPanicRace = `

internal/internaltest/static_panicweb.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ package internaltest
66

77
// staticPanicweb is a snapshot created by running:
88
//
9-
// bash static_panicweb.sh
9+
// bash static_panicweb.sh
1010
//
1111
// Not using go:generate here since it takes 2 minutes to complete.
1212
const staticPanicweb = `goroutine 135 [running]:

internal/main.go

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -8,10 +8,10 @@
88
// making the crash dump harder to read than strictly necessary.
99
//
1010
// Colors:
11-
// - Magenta: first goroutine to be listed.
12-
// - Yellow: main package.
13-
// - Green: standard library.
14-
// - Red: other packages.
11+
// - Magenta: first goroutine to be listed.
12+
// - Yellow: main package.
13+
// - Green: standard library.
14+
// - Red: other packages.
1515
//
1616
// Bright colors are used for exported symbols.
1717
package internal

internal/main_test.go

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -41,22 +41,22 @@ func TestProcess(t *testing.T) {
4141
palette: testPalette,
4242
simil: stack.AnyPointer,
4343
path: basePath,
44-
want: "GOTRACEBACK=all\npanic: simple\n\nC1: runningA\n Emain Fmain.go:71 GmainR()A\n",
44+
want: "GOTRACEBACK=all\npanic: simple\n\nC1: runningA\n Emain Fmain.go:74 GmainR()A\n",
4545
},
4646
{
4747
name: "FullPath",
4848
palette: testPalette,
4949
simil: stack.AnyValue,
5050
path: fullPath,
5151
// "/" is used even on Windows.
52-
want: fmt.Sprintf("GOTRACEBACK=all\npanic: simple\n\nC1: runningA\n Emain F%s:71 GmainR()A\n", strings.Replace(filepath.Join(filepath.Dir(d), "cmd", "panic", "main.go"), "\\", "/", -1)),
52+
want: fmt.Sprintf("GOTRACEBACK=all\npanic: simple\n\nC1: runningA\n Emain F%s:74 GmainR()A\n", strings.Replace(filepath.Join(filepath.Dir(d), "cmd", "panic", "main.go"), "\\", "/", -1)),
5353
},
5454
{
5555
name: "NoColor",
5656
palette: &Palette{},
5757
simil: stack.AnyValue,
5858
path: basePath,
59-
want: "GOTRACEBACK=all\npanic: simple\n\n1: running\n main main.go:71 main()\n",
59+
want: "GOTRACEBACK=all\npanic: simple\n\n1: running\n main main.go:74 main()\n",
6060
},
6161
{
6262
name: "Match",
@@ -72,7 +72,7 @@ func TestProcess(t *testing.T) {
7272
simil: stack.AnyValue,
7373
path: basePath,
7474
filter: regexp.MustCompile(`notpresent`),
75-
want: "GOTRACEBACK=all\npanic: simple\n\nC1: runningA\n Emain Fmain.go:71 GmainR()A\n",
75+
want: "GOTRACEBACK=all\npanic: simple\n\nC1: runningA\n Emain Fmain.go:74 GmainR()A\n",
7676
},
7777
}
7878
for i, line := range data {
@@ -107,14 +107,14 @@ func TestProcessTwoSnapshots(t *testing.T) {
107107
"GOTRACEBACK=all\n" +
108108
"panic: simple\n\n" +
109109
"1: running\n" +
110-
" main main.go:71 main()\n" +
110+
" main main.go:74 main()\n" +
111111
"Ye\n" +
112112
"GOTRACEBACK=all\n" +
113113
"panic: 42\n\n" +
114114
"1: running\n" +
115-
" main main.go:90 panicint(0x2a)\n" +
116-
" main main.go:312 glob..func9()\n" +
117-
" main main.go:73 main()\n" +
115+
" main main.go:93 panicint(0x2a)\n" +
116+
" main main.go:315 glob..func9()\n" +
117+
" main main.go:76 main()\n" +
118118
"Yo\n")
119119
compareString(t, want, out.String())
120120
}

stack/context_test.go

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1362,7 +1362,7 @@ func TestScanSnapshotSyntheticTwoSnapshots(t *testing.T) {
13621362
"main.main",
13631363
Args{},
13641364
pathJoin(ppDir, "main.go"),
1365-
71,
1365+
74,
13661366
),
13671367
},
13681368
},
@@ -1392,19 +1392,19 @@ func TestScanSnapshotSyntheticTwoSnapshots(t *testing.T) {
13921392
"main.panicint",
13931393
Args{Values: []Arg{{Value: 42}}},
13941394
pathJoin(ppDir, "main.go"),
1395-
90,
1395+
93,
13961396
),
13971397
newCallLocal(
13981398
"main.glob..func9",
13991399
Args{},
14001400
pathJoin(ppDir, "main.go"),
1401-
312,
1401+
315,
14021402
),
14031403
newCallLocal(
14041404
"main.main",
14051405
Args{},
14061406
pathJoin(ppDir, "main.go"),
1407-
73,
1407+
76,
14081408
),
14091409
},
14101410
},
@@ -1881,7 +1881,7 @@ func testPanicRace(t *testing.T, s *Snapshot, b *bytes.Buffer, ppDir string) {
18811881
"main.main",
18821882
Args{},
18831883
pathJoin(ppDir, "main.go"),
1884-
73,
1884+
76,
18851885
),
18861886
},
18871887
},
@@ -1917,7 +1917,7 @@ func testPanicRace(t *testing.T, s *Snapshot, b *bytes.Buffer, ppDir string) {
19171917
"main.main",
19181918
Args{},
19191919
pathJoin(ppDir, "main.go"),
1920-
73,
1920+
76,
19211921
),
19221922
},
19231923
},

0 commit comments

Comments
 (0)