Skip to content

Commit 882c1d1

Browse files
author
Theo
committed
Fixed some typos
1 parent 7f7699b commit 882c1d1

File tree

7 files changed

+13
-14
lines changed

7 files changed

+13
-14
lines changed

query.go

+1-1
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ func stripQuery(q string) (s string) {
1515

1616
// QueryMatcher is an SQL query string matcher interface,
1717
// which can be used to customize validation of SQL query strings.
18-
// As an exaple, external library could be used to build
18+
// As an example, external library could be used to build
1919
// and validate SQL ast, columns selected.
2020
//
2121
// sqlmock can be customized to implement a different QueryMatcher

result_test.go

+3-3
Original file line numberDiff line numberDiff line change
@@ -35,21 +35,21 @@ func TestShouldReturnValidSqlDriverResult(t *testing.T) {
3535
result := NewResult(1, 2)
3636
id, err := result.LastInsertId()
3737
if 1 != id {
38-
t.Errorf("Expected last insert id to be 1, but got: %d", id)
38+
t.Errorf("expected last insert id to be 1, but got: %d", id)
3939
}
4040
if err != nil {
4141
t.Errorf("expected no error, but got: %s", err)
4242
}
4343
affected, err := result.RowsAffected()
4444
if 2 != affected {
45-
t.Errorf("Expected affected rows to be 2, but got: %d", affected)
45+
t.Errorf("expected affected rows to be 2, but got: %d", affected)
4646
}
4747
if err != nil {
4848
t.Errorf("expected no error, but got: %s", err)
4949
}
5050
}
5151

52-
func TestShouldReturnErroeSqlDriverResult(t *testing.T) {
52+
func TestShouldReturnErrorSqlDriverResult(t *testing.T) {
5353
result := NewErrorResult(fmt.Errorf("some error"))
5454
_, err := result.LastInsertId()
5555
if err == nil {

rows.go

+2-2
Original file line numberDiff line numberDiff line change
@@ -9,9 +9,9 @@ import (
99
)
1010

1111
// CSVColumnParser is a function which converts trimmed csv
12-
// column string to a []byte representation. currently
12+
// column string to a []byte representation. Currently
1313
// transforms NULL to nil
14-
var CSVColumnParser = func(s string) []byte {
14+
var CSVColumnParser = func(s string) []bytezzx {
1515
switch {
1616
case strings.ToLower(s) == "null":
1717
return nil

sqlmock.go

+1-1
Original file line numberDiff line numberDiff line change
@@ -118,7 +118,7 @@ func (c *sqlmock) MatchExpectationsInOrder(b bool) {
118118
}
119119

120120
// Close a mock database driver connection. It may or may not
121-
// be called depending on the sircumstances, but if it is called
121+
// be called depending on the circumstances, but if it is called
122122
// there must be an *ExpectedClose expectation satisfied.
123123
// meets http://golang.org/pkg/database/sql/driver/#Conn interface
124124
func (c *sqlmock) Close() error {

sqlmock_test.go

+4-4
Original file line numberDiff line numberDiff line change
@@ -114,7 +114,7 @@ func TestMockQuery(t *testing.T) {
114114

115115
defer func() {
116116
if er := rows.Close(); er != nil {
117-
t.Error("Unexpected error while trying to close rows")
117+
t.Error("unexpected error while trying to close rows")
118118
}
119119
}()
120120

@@ -167,7 +167,7 @@ func TestMockQueryTypes(t *testing.T) {
167167
}
168168
defer func() {
169169
if er := rows.Close(); er != nil {
170-
t.Error("Unexpected error while trying to close rows")
170+
t.Error("unexpected error while trying to close rows")
171171
}
172172
}()
173173
if !rows.Next() {
@@ -615,7 +615,7 @@ func TestArgumentReflectValueTypeError(t *testing.T) {
615615

616616
_, err = db.Query("SELECT * FROM sales WHERE x = ?", 5)
617617
if err == nil {
618-
t.Error("Expected error, but got none")
618+
t.Error("expected error, but got none")
619619
}
620620
}
621621

@@ -782,7 +782,7 @@ func TestEmptyRowSet(t *testing.T) {
782782

783783
defer func() {
784784
if er := rows.Close(); er != nil {
785-
t.Error("Unexpected error while trying to close rows")
785+
t.Error("unexpected error while trying to close rows")
786786
}
787787
}()
788788

statement_test.go

+2-2
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ import (
77
"testing"
88
)
99

10-
func TestExpectedPreparedStatemtCloseError(t *testing.T) {
10+
func TestExpectedPreparedStatementCloseError(t *testing.T) {
1111
conn, mock, err := New()
1212
if err != nil {
1313
t.Fatal("failed to open sqlmock database:", err)
@@ -28,6 +28,6 @@ func TestExpectedPreparedStatemtCloseError(t *testing.T) {
2828
}
2929

3030
if err := stmt.Close(); err != want {
31-
t.Fatalf("Got = %v, want = %v", err, want)
31+
t.Fatalf("got = %v, want = %v", err, want)
3232
}
3333
}

stubs_test.go

-1
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,6 @@ func (ni *NullInt) Scan(value interface{}) error {
2525
ni.Integer, ni.Valid = 0, false
2626
case int64:
2727
const maxUint = ^uint(0)
28-
const minUint = 0
2928
const maxInt = int(maxUint >> 1)
3029
const minInt = -maxInt - 1
3130

0 commit comments

Comments
 (0)