Skip to content

Commit b5cf80b

Browse files
committed
log: make the name of error clearer
The variable named `err4` is a bit confusing, `err` will be better.
1 parent 9d23975 commit b5cf80b

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

src/log/log_test.go

+3-3
Original file line numberDiff line numberDiff line change
@@ -61,9 +61,9 @@ func testPrint(t *testing.T, flag int, prefix string, pattern string, useFormat
6161
line := buf.String()
6262
line = line[0 : len(line)-1]
6363
pattern = "^" + pattern + "hello 23 world$"
64-
matched, err4 := regexp.MatchString(pattern, line)
65-
if err4 != nil {
66-
t.Fatal("pattern did not compile:", err4)
64+
matched, err := regexp.MatchString(pattern, line)
65+
if err != nil {
66+
t.Fatal("pattern did not compile:", err)
6767
}
6868
if !matched {
6969
t.Errorf("log output should match %q is %q", pattern, line)

0 commit comments

Comments
 (0)