forked from mirror/gorm
Update README
This commit is contained in:
parent
4e1e2a0fbb
commit
5a02c2ec27
|
@ -80,6 +80,7 @@ package db
|
||||||
|
|
||||||
var DB gorm.DB
|
var DB gorm.DB
|
||||||
func init() {
|
func init() {
|
||||||
|
var err error
|
||||||
DB, err = gorm.Open("postgres", "user=gorm dbname=gorm sslmode=disable")
|
DB, err = gorm.Open("postgres", "user=gorm dbname=gorm sslmode=disable")
|
||||||
if err != nil {
|
if err != nil {
|
||||||
panic(fmt.Sprintf("Got error when connect database, the error is '%v'", err))
|
panic(fmt.Sprintf("Got error when connect database, the error is '%v'", err))
|
||||||
|
|
Loading…
Reference in New Issue