diff options
Diffstat (limited to 'libgo/go/database/sql/sql.go')
-rw-r--r-- | libgo/go/database/sql/sql.go | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/libgo/go/database/sql/sql.go b/libgo/go/database/sql/sql.go index 5c5b7dc7e97..0f5bbc01c9e 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() { |