Add util for ungraceful sql execs
This commit is contained in:
parent
eda62a91dc
commit
5d34279862
@ -6,8 +6,8 @@ import (
|
|||||||
log "github.com/sirupsen/logrus"
|
log "github.com/sirupsen/logrus"
|
||||||
)
|
)
|
||||||
|
|
||||||
// mustExec will execute a SQL statement on a provided database instance.
|
// MustExec will execute a SQL statement on a provided database instance.
|
||||||
func mustExec(s string, db *sql.DB) {
|
func MustExec(s string, db *sql.DB) {
|
||||||
stmt, err := db.Prepare(s)
|
stmt, err := db.Prepare(s)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
log.Fatal(err)
|
log.Fatal(err)
|
||||||
|
Loading…
x
Reference in New Issue
Block a user