diff --git a/main.go b/main.go index 7c8e1fd..84c8a2d 100644 --- a/main.go +++ b/main.go @@ -14,7 +14,10 @@ import ( "flag" ) -const VERSION = "0.1" +const ( + VERSION = "0.1" + MAX_DB_CONNS = 10 // already excessive for personal app +) type Config struct { Sql struct { @@ -65,6 +68,8 @@ func dbConnect() { fmt.Println("DB Error on Ping(): ", err) os.Exit(-1) } + + db.SetMaxIdleConns(MAX_DB_CONNS) } func initTemplates() {