Commit 91170d72 authored by royeo's avatar royeo Committed by Brad Fitzpatrick

log: make the name of error clearer

Change-Id: Id0398b51336cc74f2172d9b8e18cb1dcb520b9a0
GitHub-Last-Rev: b5cf80bf9d7f79eab1a398ad3c03f3b424aafdf1
GitHub-Pull-Request: golang/go#29931
Reviewed-on: https://go-review.googlesource.com/c/go/+/159537Reviewed-by: default avatarEmmanuel Odeke <emm.odeke@gmail.com>
Reviewed-by: default avatarBrad Fitzpatrick <bradfitz@golang.org>
Run-TryBot: Emmanuel Odeke <emm.odeke@gmail.com>
TryBot-Result: Gobot Gobot <gobot@golang.org>
parent 4e2b0dda
...@@ -61,9 +61,9 @@ func testPrint(t *testing.T, flag int, prefix string, pattern string, useFormat ...@@ -61,9 +61,9 @@ func testPrint(t *testing.T, flag int, prefix string, pattern string, useFormat
line := buf.String() line := buf.String()
line = line[0 : len(line)-1] line = line[0 : len(line)-1]
pattern = "^" + pattern + "hello 23 world$" pattern = "^" + pattern + "hello 23 world$"
matched, err4 := regexp.MatchString(pattern, line) matched, err := regexp.MatchString(pattern, line)
if err4 != nil { if err != nil {
t.Fatal("pattern did not compile:", err4) t.Fatal("pattern did not compile:", err)
} }
if !matched { if !matched {
t.Errorf("log output should match %q is %q", pattern, line) t.Errorf("log output should match %q is %q", pattern, line)
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment