update revive to use defaults and friendly formatter

This commit is contained in:
2019-11-07 12:57:50 -08:00
parent 5e4e253f58
commit aaeb303558
4 changed files with 4 additions and 29 deletions

View File

@@ -22,10 +22,10 @@ func connectToDb() {
orm.DefaultTimeLoc = time.UTC
POSTGRES_DB_URL := os.Getenv("POSTGRES_DB_URL")
dbURL := os.Getenv("POSTGRES_DB_URL")
orm.RegisterDriver("postgres", orm.DRPostgres)
orm.RegisterDataBase("default", "postgres", POSTGRES_DB_URL)
orm.RegisterDataBase("default", "postgres", dbURL)
orm.SetMaxIdleConns("default", 1)
orm.SetMaxOpenConns("default", 5)

View File

@@ -2,7 +2,7 @@ package models
import "time"
// Merps are the primary database item in merp
// Merp is the data model for storing merps in the db
type Merp struct {
ID int `orm:"auto;column(id)"`
Content string `json:"content" orm:"type(jsonb);column(content)"`