dereference double pointer before use for go 1.4 compatibility
parent
8ba96c9327
commit
530bdda699
|
@ -3,6 +3,7 @@ package postgis
|
|||
import (
|
||||
"database/sql"
|
||||
"fmt"
|
||||
_ "log"
|
||||
"os"
|
||||
"strings"
|
||||
"sync"
|
||||
|
@ -94,7 +95,7 @@ func dropTableIfExists(tx *sql.Tx, schema, table string) error {
|
|||
// rollbackIfTx rollsback transaction if tx is not nil.
|
||||
func rollbackIfTx(tx **sql.Tx) {
|
||||
if *tx != nil {
|
||||
if err := tx.Rollback(); err != nil {
|
||||
if err := (*tx).Rollback(); err != nil {
|
||||
log.Fatal("rollback failed", err)
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue