init commit

This commit is contained in:
sentriz
2019-03-24 17:49:03 +00:00
commit e9c0f09d0c
527 changed files with 477627 additions and 0 deletions

16
db/db.go Normal file
View File

@@ -0,0 +1,16 @@
package db
import (
"log"
"github.com/jinzhu/gorm"
)
// New creates a new GORM connection to the database
func New() *gorm.DB {
db, err := gorm.Open("sqlite3", "gonic.db")
if err != nil {
log.Printf("when opening database: %v\n", err)
}
return db
}