dereference double pointer before use for go 1.4 compatibility

Oliver Tonnhofer 2015-01-05 11:50:39 +01:00
parent 8ba96c9327
commit 530bdda699
1 changed files with 2 additions and 1 deletions

View File

@ -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)
}
}