1
0
mirror of https://github.com/golang/go synced 2024-11-23 04:40:09 -07:00

log: make the name of error clearer

Change-Id: Id0398b51336cc74f2172d9b8e18cb1dcb520b9a0
GitHub-Last-Rev: b5cf80bf9d
GitHub-Pull-Request: golang/go#29931
Reviewed-on: https://go-review.googlesource.com/c/go/+/159537
Reviewed-by: Emmanuel Odeke <emm.odeke@gmail.com>
Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org>
Run-TryBot: Emmanuel Odeke <emm.odeke@gmail.com>
TryBot-Result: Gobot Gobot <gobot@golang.org>
This commit is contained in:
royeo 2019-01-25 05:51:25 +00:00 committed by Brad Fitzpatrick
parent 4e2b0dda8c
commit 91170d7201

View File

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