Skip to content

Commit 47611e0

Browse files
committed
just pretty source code and upgrade go version to go1.18 as minimum support
1 parent 28212d4 commit 47611e0

15 files changed

Lines changed: 47 additions & 46 deletions

.gitignore

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -23,3 +23,6 @@ _testmain.go
2323
*.exe
2424
tags
2525
environ
26+
27+
.env
28+
.envrc

Makefile

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
.PHONY: fmt
2+
fmt:
3+
go fmt ./...
4+
5+
.PHONY: test
6+
test:
7+
go test ./...

bind.go

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -22,10 +22,10 @@ const (
2222
)
2323

2424
var defaultBinds = map[int][]string{
25-
DOLLAR: []string{"postgres", "pgx", "pq-timeouts", "cloudsqlpostgres", "ql", "nrpostgres", "cockroach"},
26-
QUESTION: []string{"mysql", "sqlite3", "nrmysql", "nrsqlite3"},
27-
NAMED: []string{"oci8", "ora", "goracle", "godror"},
28-
AT: []string{"sqlserver"},
25+
DOLLAR: {"postgres", "pgx", "pq-timeouts", "cloudsqlpostgres", "ql", "nrpostgres", "cockroach"},
26+
QUESTION: {"mysql", "sqlite3", "nrmysql", "nrsqlite3"},
27+
NAMED: {"oci8", "ora", "goracle", "godror"},
28+
AT: {"sqlserver"},
2929
}
3030

3131
var binds sync.Map

doc.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,5 +8,5 @@
88
// Additions include scanning into structs, named query support, rebinding
99
// queries for different drivers, convenient shorthands for common error handling
1010
// and more.
11-
//
11+
1212
package sqlx

go.mod

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,9 @@
11
module github.com/jmoiron/sqlx
22

3-
go 1.10
3+
go 1.18
44

55
require (
6-
github.com/go-sql-driver/mysql v1.6.0
7-
github.com/lib/pq v1.2.0
8-
github.com/mattn/go-sqlite3 v1.14.6
6+
github.com/go-sql-driver/mysql v1.7.1
7+
github.com/lib/pq v1.10.9
8+
github.com/mattn/go-sqlite3 v1.14.17
99
)

go.sum

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
1-
github.com/go-sql-driver/mysql v1.6.0 h1:BCTh4TKNUYmOmMUcQ3IipzF5prigylS7XXjEkfCHuOE=
2-
github.com/go-sql-driver/mysql v1.6.0/go.mod h1:DCzpHaOWr8IXmIStZouvnhqoel9Qv2LBy8hT2VhHyBg=
3-
github.com/lib/pq v1.2.0 h1:LXpIM/LZ5xGFhOpXAQUIMM1HdyqzVYM13zNdjCEEcA0=
4-
github.com/lib/pq v1.2.0/go.mod h1:5WUZQaWbwv1U+lTReE5YruASi9Al49XbQIvNi/34Woo=
5-
github.com/mattn/go-sqlite3 v1.14.6 h1:dNPt6NO46WmLVt2DLNpwczCmdV5boIZ6g/tlDrlRUbg=
6-
github.com/mattn/go-sqlite3 v1.14.6/go.mod h1:NyWgC/yNuGj7Q9rpYnZvas74GogHl5/Z4A/KQRfk6bU=
1+
github.com/go-sql-driver/mysql v1.7.1 h1:lUIinVbN1DY0xBg0eMOzmmtGoHwWBbvnWubQUrtU8EI=
2+
github.com/go-sql-driver/mysql v1.7.1/go.mod h1:OXbVy3sEdcQ2Doequ6Z5BW6fXNQTmx+9S1MCJN5yJMI=
3+
github.com/lib/pq v1.10.9 h1:YXG7RB+JIjhP29X+OtkiDnYaXQwpS4JEWq7dtCCRUEw=
4+
github.com/lib/pq v1.10.9/go.mod h1:AlVN5x4E4T544tWzH6hKfbfQvm3HdbOxrmggDNAPY9o=
5+
github.com/mattn/go-sqlite3 v1.14.17 h1:mCRHCLDUBXgpKAqIKsaAaAsrAlbkeomtRFKXh2L6YIM=
6+
github.com/mattn/go-sqlite3 v1.14.17/go.mod h1:2eHXhiwb8IkHr+BDWZGa96P6+rkvnG63S2DGjv9HUNg=

named.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ package sqlx
1010
//
1111
// * compileNamedQuery - rebind a named query, returning a query and list of names
1212
// * bindArgs, bindMapArgs, bindAnyArgs - given a list of names, return an arglist
13-
//
13+
1414
import (
1515
"bytes"
1616
"database/sql"

named_context.go

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,3 @@
1-
// +build go1.8
2-
31
package sqlx
42

53
import (

named_context_test.go

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,3 @@
1-
// +build go1.8
2-
31
package sqlx
42

53
import (

reflectx/reflect.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
// allows for Go-compatible named attribute access, including accessing embedded
44
// struct attributes and the ability to use functions and struct tags to
55
// customize field names.
6-
//
6+
77
package reflectx
88

99
import (

0 commit comments

Comments
 (0)