From c50182480db093e447f02e76a735ed23a80305bf Mon Sep 17 00:00:00 2001 From: Robert Hencke Date: Thu, 13 Oct 2011 13:34:01 +1100 Subject: [PATCH] pkg: fix incorrect prints found by govet R=golang-dev, nigeltao CC=golang-dev https://golang.org/cl/5266041 --- src/pkg/exp/sql/fakedb_test.go | 2 +- src/pkg/exp/sql/sql_test.go | 2 +- src/pkg/exp/template/html/escape_test.go | 2 +- src/pkg/template/exec_test.go | 2 +- 4 files changed, 4 insertions(+), 4 deletions(-) diff --git a/src/pkg/exp/sql/fakedb_test.go b/src/pkg/exp/sql/fakedb_test.go index 40f60f782b9..c906185e584 100644 --- a/src/pkg/exp/sql/fakedb_test.go +++ b/src/pkg/exp/sql/fakedb_test.go @@ -145,7 +145,7 @@ func (db *fakeDB) createTable(name string, columnNames, columnTypes []string) os } if len(columnNames) != len(columnTypes) { 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} return nil diff --git a/src/pkg/exp/sql/sql_test.go b/src/pkg/exp/sql/sql_test.go index 9dca710e618..eaa0a90356b 100644 --- a/src/pkg/exp/sql/sql_test.go +++ b/src/pkg/exp/sql/sql_test.go @@ -85,7 +85,7 @@ func TestStatementQueryRow(t *testing.T) { if err := stmt.QueryRow(tt.name).Scan(&age); err != nil { t.Errorf("%d: on %q, QueryRow/Scan: %v", n, tt.name, err) } 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) } } diff --git a/src/pkg/exp/template/html/escape_test.go b/src/pkg/exp/template/html/escape_test.go index 9466cc1d5d6..e5f83709353 100644 --- a/src/pkg/exp/template/html/escape_test.go +++ b/src/pkg/exp/template/html/escape_test.go @@ -1570,7 +1570,7 @@ func TestEscapeErrorsNotIgnorable(t *testing.T) { func TestEscapeSetErrorsNotIgnorable(t *testing.T) { s, err := (&template.Set{}).Parse(`{{define "t"}}