diff options
author | Ian Lance Taylor <iant@golang.org> | 2020-01-02 15:05:27 -0800 |
---|---|---|
committer | Ian Lance Taylor <iant@golang.org> | 2020-01-21 23:53:22 -0800 |
commit | 5a8ea165926cb0737ab03bc48c18dc5198ab5305 (patch) | |
tree | 962dc3357c57f019f85658f99e2e753e30201c27 /libgo/go/database/sql | |
parent | 6ac6529e155c9baa0aaaed7aca06bd38ebda5b43 (diff) | |
download | gcc-5a8ea165926cb0737ab03bc48c18dc5198ab5305.zip gcc-5a8ea165926cb0737ab03bc48c18dc5198ab5305.tar.gz gcc-5a8ea165926cb0737ab03bc48c18dc5198ab5305.tar.bz2 |
libgo: update to Go1.14beta1
Reviewed-on: https://go-review.googlesource.com/c/gofrontend/+/214297
Diffstat (limited to 'libgo/go/database/sql')
-rw-r--r-- | libgo/go/database/sql/convert.go | 2 | ||||
-rw-r--r-- | libgo/go/database/sql/convert_test.go | 4 | ||||
-rw-r--r-- | libgo/go/database/sql/ctxutil.go | 2 | ||||
-rw-r--r-- | libgo/go/database/sql/fakedb_test.go | 3 | ||||
-rw-r--r-- | libgo/go/database/sql/sql.go | 4 | ||||
-rw-r--r-- | libgo/go/database/sql/sql_test.go | 2 |
6 files changed, 6 insertions, 11 deletions
diff --git a/libgo/go/database/sql/convert.go b/libgo/go/database/sql/convert.go index 4c056a1..b966ef9 100644 --- a/libgo/go/database/sql/convert.go +++ b/libgo/go/database/sql/convert.go @@ -565,7 +565,7 @@ func callValuerValue(vr driver.Valuer) (v driver.Value, err error) { // coefficient (also known as a significand) as a []byte, and an int32 exponent. // These are composed into a final value as "decimal = (neg) (form=finite) coefficient * 10 ^ exponent". // A zero length coefficient is a zero value. -// The big-endian integer coefficent stores the most significant byte first (at coefficent[0]). +// The big-endian integer coefficient stores the most significant byte first (at coefficient[0]). // If the form is not finite the coefficient and exponent should be ignored. // The negative parameter may be set to true for any form, although implementations are not required // to respect the negative parameter in the non-finite form. diff --git a/libgo/go/database/sql/convert_test.go b/libgo/go/database/sql/convert_test.go index 8a82891..2668a5e 100644 --- a/libgo/go/database/sql/convert_test.go +++ b/libgo/go/database/sql/convert_test.go @@ -525,7 +525,7 @@ func (d *dec) Compose(form byte, negative bool, coefficient []byte, exponent int // This isn't strictly correct, as the extra bytes could be all zero, // ignore this for this test. if len(coefficient) > 16 { - return fmt.Errorf("coefficent too large") + return fmt.Errorf("coefficient too large") } copy(d.coefficient[:], coefficient) @@ -558,7 +558,7 @@ func (d *decFinite) Compose(form byte, negative bool, coefficient []byte, expone // This isn't strictly correct, as the extra bytes could be all zero, // ignore this for this test. if len(coefficient) > 16 { - return fmt.Errorf("coefficent too large") + return fmt.Errorf("coefficient too large") } copy(d.coefficient[:], coefficient) diff --git a/libgo/go/database/sql/ctxutil.go b/libgo/go/database/sql/ctxutil.go index af2afd5..4dbe6af 100644 --- a/libgo/go/database/sql/ctxutil.go +++ b/libgo/go/database/sql/ctxutil.go @@ -94,8 +94,6 @@ func ctxDriverStmtQuery(ctx context.Context, si driver.Stmt, nvdargs []driver.Na return si.Query(dargs) } -var errLevelNotSupported = errors.New("sql: selected isolation level is not supported") - func ctxDriverBegin(ctx context.Context, opts *TxOptions, ci driver.Conn) (driver.Tx, error) { if ciCtx, is := ci.(driver.ConnBeginTx); is { dopts := driver.TxOptions{} diff --git a/libgo/go/database/sql/fakedb_test.go b/libgo/go/database/sql/fakedb_test.go index c0371f3..a0028be 100644 --- a/libgo/go/database/sql/fakedb_test.go +++ b/libgo/go/database/sql/fakedb_test.go @@ -10,7 +10,6 @@ import ( "errors" "fmt" "io" - "log" "reflect" "sort" "strconv" @@ -20,8 +19,6 @@ import ( "time" ) -var _ = log.Printf - // fakeDriver is a fake database that implements Go's driver.Driver // interface, just for testing. // diff --git a/libgo/go/database/sql/sql.go b/libgo/go/database/sql/sql.go index 5c5b7dc..0f5bbc01 100644 --- a/libgo/go/database/sql/sql.go +++ b/libgo/go/database/sql/sql.go @@ -64,7 +64,7 @@ func unregisterAllDrivers() { func Drivers() []string { driversMu.RLock() defer driversMu.RUnlock() - var list []string + list := make([]string, 0, len(drivers)) for name := range drivers { list = append(list, name) } @@ -2040,7 +2040,7 @@ func (tx *Tx) grabConn(ctx context.Context) (*driverConn, releaseConn, error) { return nil, nil, ctx.Err() } - // closeme.RLock must come before the check for isDone to prevent the Tx from + // closemu.RLock must come before the check for isDone to prevent the Tx from // closing while a query is executing. tx.closemu.RLock() if tx.isDone() { diff --git a/libgo/go/database/sql/sql_test.go b/libgo/go/database/sql/sql_test.go index f68cefe..ed0099e 100644 --- a/libgo/go/database/sql/sql_test.go +++ b/libgo/go/database/sql/sql_test.go @@ -3783,7 +3783,7 @@ func (c *ctxOnlyConn) ExecContext(ctx context.Context, q string, args []driver.N // TestQueryExecContextOnly ensures drivers only need to implement QueryContext // and ExecContext methods. func TestQueryExecContextOnly(t *testing.T) { - // Ensure connection does not implment non-context interfaces. + // Ensure connection does not implement non-context interfaces. var connType driver.Conn = &ctxOnlyConn{} if _, ok := connType.(driver.Execer); ok { t.Fatalf("%T must not implement driver.Execer", connType) |