2 Star 0 Fork 1

taotechip / modules

加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
克隆/下载
init.go 489 Bytes
一键复制 编辑 原始数据 按行查看 历史
kyugao 提交于 2021-04-15 00:55 . 初始化
package cache
import (
"gitee.com/kyugao/ujson"
"github.com/jinzhu/configor"
"github.com/rs/zerolog/log"
)
var Config = struct {
Ip string
Port string
Db string
Session struct {
Db string
TempSessionAliveSeconds int
ActiveSeconds int
Refresh bool
}
}{}
func init() {
err := configor.Load(&Config, "conf/cache.yml")
if err != nil {
panic(err)
}
log.Info().Msgf("config=%s", ujson.ToJsonString(&Config))
}
1
https://gitee.com/taotechip/modules.git
git@gitee.com:taotechip/modules.git
taotechip
modules
modules
v0.5.5

搜索帮助