Commit 66b07f8e by 孙龙

up

parent c764e462
......@@ -3,6 +3,7 @@ package dao
import (
_ "github.com/lib/pq"
"github.com/xormplus/xorm"
"github.com/ichunt2019/cfg/lib"
)
type Dao struct {
......@@ -11,11 +12,7 @@ type Dao struct {
func New() (Dao){
conns := []string{
"mysql://mysql:root@localhost:5432/test?sslmode=disable;",
"mysql://mysql:root@localhost:5432/test1?sslmode=disable;",
"mysql://mysql:root@localhost:5432/test2?sslmode=disable",
}
conns := lib.Instance("config.mysql.liexin")
lieXinDb, err := xorm.NewEngineGroup("mysql",conns)
if err != nil {
panic(err)
......
......@@ -26,7 +26,11 @@ dob = 1979-05-27T07:32:00Z # 日期时间是一等公民。为什么不呢?
data = [["gamma", "delta"],[1, 2]]
[mysql]
liexin = ["mysql://mysql:root@localhost:5432/test?sslmode=disable;",
"mysql://mysql:root@localhost:5432/test1?sslmode=disable;",
"mysql://mysql:root@localhost:5432/test2?sslmode=disable"
]
......
......@@ -16,6 +16,8 @@ micro_service_name = "golang_common_demo"
weight = 10
[base]
debug_mode="debug"
time_location="Asia/Chongqing"
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or sign in to comment