Skip to content
Snippets Groups Projects
Commit ee1ca183 authored by Emanuel Petrinovic's avatar Emanuel Petrinovic
Browse files

global DB var

parent 20b5aa1b
No related branches found
No related tags found
No related merge requests found
......@@ -11,6 +11,8 @@ import (
log "github.com/sirupsen/logrus"
)
var DB *gorm.DB
func init() {
dsn := fmt.Sprintf("root:root@tcp(%s)/myaktion?charset=utf8&parseTime=True&loc=Local", os.Getenv("DB_CONNECT"))
log.Info("Using DSN for DB:", dsn)
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment