Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
G
go
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
Kirill Smelkov
go
Commits
c5018248
Commit
c5018248
authored
Oct 13, 2011
by
Robert Hencke
Committed by
Nigel Tao
Oct 13, 2011
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
pkg: fix incorrect prints found by govet
R=golang-dev, nigeltao CC=golang-dev
https://golang.org/cl/5266041
parent
beed0a78
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
4 additions
and
4 deletions
+4
-4
src/pkg/exp/sql/fakedb_test.go
src/pkg/exp/sql/fakedb_test.go
+1
-1
src/pkg/exp/sql/sql_test.go
src/pkg/exp/sql/sql_test.go
+1
-1
src/pkg/exp/template/html/escape_test.go
src/pkg/exp/template/html/escape_test.go
+1
-1
src/pkg/template/exec_test.go
src/pkg/template/exec_test.go
+1
-1
No files found.
src/pkg/exp/sql/fakedb_test.go
View file @
c5018248
...
...
@@ -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
...
...
src/pkg/exp/sql/sql_test.go
View file @
c5018248
...
...
@@ -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
)
}
}
...
...
src/pkg/exp/template/html/escape_test.go
View file @
c5018248
...
...
@@ -1570,7 +1570,7 @@ func TestEscapeErrorsNotIgnorable(t *testing.T) {
func
TestEscapeSetErrorsNotIgnorable
(
t
*
testing
.
T
)
{
s
,
err
:=
(
&
template
.
Set
{})
.
Parse
(
`{{define "t"}}<a{{end}}`
)
if
err
!=
nil
{
t
.
Error
(
"failed to parse set: %q"
,
err
)
t
.
Error
f
(
"failed to parse set: %q"
,
err
)
}
EscapeSet
(
s
,
"t"
)
var
b
bytes
.
Buffer
...
...
src/pkg/template/exec_test.go
View file @
c5018248
...
...
@@ -532,7 +532,7 @@ func TestDelims(t *testing.T) {
t
.
Fatalf
(
"delim %q exec err %s"
,
left
,
err
)
}
if
b
.
String
()
!=
hello
+
trueLeft
{
t
.
Error
(
"expected %q got %q"
,
hello
+
trueLeft
,
b
.
String
())
t
.
Error
f
(
"expected %q got %q"
,
hello
+
trueLeft
,
b
.
String
())
}
}
}
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment