update revive to use defaults and friendly formatter
This commit is contained in:
@@ -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)
|
||||
|
||||
|
||||
@@ -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)"`
|
||||
|
||||
Reference in New Issue
Block a user