Commit c5018248 authored by Robert Hencke's avatar Robert Hencke Committed by Nigel Tao

pkg: fix incorrect prints found by govet

R=golang-dev, nigeltao
CC=golang-dev
https://golang.org/cl/5266041
parent beed0a78
...@@ -145,7 +145,7 @@ func (db *fakeDB) createTable(name string, columnNames, columnTypes []string) os ...@@ -145,7 +145,7 @@ func (db *fakeDB) createTable(name string, columnNames, columnTypes []string) os
} }
if len(columnNames) != len(columnTypes) { if len(columnNames) != len(columnTypes) {
return fmt.Errorf("create table of %q len(names) != len(types): %d vs %d", return fmt.Errorf("create table of %q len(names) != len(types): %d vs %d",
len(columnNames), len(columnTypes)) name, len(columnNames), len(columnTypes))
} }
db.tables[name] = &table{colname: columnNames, coltype: columnTypes} db.tables[name] = &table{colname: columnNames, coltype: columnTypes}
return nil return nil
......
...@@ -85,7 +85,7 @@ func TestStatementQueryRow(t *testing.T) { ...@@ -85,7 +85,7 @@ func TestStatementQueryRow(t *testing.T) {
if err := stmt.QueryRow(tt.name).Scan(&age); err != nil { if err := stmt.QueryRow(tt.name).Scan(&age); err != nil {
t.Errorf("%d: on %q, QueryRow/Scan: %v", n, tt.name, err) t.Errorf("%d: on %q, QueryRow/Scan: %v", n, tt.name, err)
} else if age != tt.want { } else if age != tt.want {
t.Errorf("%d: age=%d, want %d", age, tt.want) t.Errorf("%d: age=%d, want %d", n, age, tt.want)
} }
} }
......
...@@ -1570,7 +1570,7 @@ func TestEscapeErrorsNotIgnorable(t *testing.T) { ...@@ -1570,7 +1570,7 @@ func TestEscapeErrorsNotIgnorable(t *testing.T) {
func TestEscapeSetErrorsNotIgnorable(t *testing.T) { func TestEscapeSetErrorsNotIgnorable(t *testing.T) {
s, err := (&template.Set{}).Parse(`{{define "t"}}<a{{end}}`) s, err := (&template.Set{}).Parse(`{{define "t"}}<a{{end}}`)
if err != nil { if err != nil {
t.Error("failed to parse set: %q", err) t.Errorf("failed to parse set: %q", err)
} }
EscapeSet(s, "t") EscapeSet(s, "t")
var b bytes.Buffer var b bytes.Buffer
......
...@@ -532,7 +532,7 @@ func TestDelims(t *testing.T) { ...@@ -532,7 +532,7 @@ func TestDelims(t *testing.T) {
t.Fatalf("delim %q exec err %s", left, err) t.Fatalf("delim %q exec err %s", left, err)
} }
if b.String() != hello+trueLeft { if b.String() != hello+trueLeft {
t.Error("expected %q got %q", hello+trueLeft, b.String()) t.Errorf("expected %q got %q", hello+trueLeft, b.String())
} }
} }
} }
......
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