use log.Fatal instead panic on config errors
This commit is contained in:
parent
2dc0f02d1c
commit
fce1b99683
7 changed files with 22 additions and 28 deletions
|
|
@ -1,7 +1,7 @@
|
|||
package database
|
||||
|
||||
import (
|
||||
"fmt"
|
||||
"log"
|
||||
"time"
|
||||
|
||||
"github.com/spf13/viper"
|
||||
|
|
@ -28,7 +28,7 @@ func DBConn() (*pg.DB, error) {
|
|||
if err != nil {
|
||||
panic(err)
|
||||
}
|
||||
fmt.Printf("%s %s\n", time.Since(event.StartTime), query)
|
||||
log.Printf("%s %s\n", time.Since(event.StartTime), query)
|
||||
})
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue