201
This commit is contained in:
@@ -74,10 +74,12 @@ type ServiceContext struct {
|
||||
|
||||
func NewServiceContext(c config.Config) *ServiceContext {
|
||||
// gorm initialize
|
||||
fmt.Printf(" [Debug] MySQL Config -> Addr: %s, User: %s, DB: %s\n", c.MySQL.Addr, c.MySQL.Username, c.MySQL.Dbname)
|
||||
db, err := orm.ConnectMysql(orm.Mysql{
|
||||
Config: c.MySQL,
|
||||
})
|
||||
if err != nil {
|
||||
fmt.Printf(" [Debug] Connection Error: %v\n", err)
|
||||
panic(err.Error())
|
||||
}
|
||||
rds := redis.NewClient(&redis.Options{
|
||||
|
||||
Reference in New Issue
Block a user