summaryrefslogtreecommitdiff
path: root/src/log
diff options
context:
space:
mode:
authorroyeo <ljn6176@gmail.com>2019-01-25 05:51:25 +0000
committerBrad Fitzpatrick <bradfitz@golang.org>2019-03-07 15:36:29 +0000
commit91170d7201253616620c78ce961a89a55fb9e732 (patch)
tree412485e84dddc30739104efd7f80a2c6712474d5 /src/log
parent4e2b0dda8cbab104635d59ef5a68e4342250094b (diff)
downloadgo-git-91170d7201253616620c78ce961a89a55fb9e732.tar.gz
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/+/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>
Diffstat (limited to 'src/log')
-rw-r--r--src/log/log_test.go6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/log/log_test.go b/src/log/log_test.go
index adc15e7e8e..b79251877e 100644
--- a/src/log/log_test.go
+++ b/src/log/log_test.go
@@ -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)