new
This commit is contained in:
xiexiaojun
2019-05-14 21:19:00 +08:00
parent 6511a0be74
commit 3acd87d714
4 changed files with 7 additions and 6 deletions

View File

@@ -2,7 +2,9 @@ package config
import (
"fmt"
"public/tools"
"github.com/xie1xiao1jun/public/dev"
"github.com/xie1xiao1jun/public/tools"
"github.com/BurntSushi/toml"
)
@@ -20,6 +22,7 @@ var _map = Config{}
func init() {
onInit()
dev.OnSetDev(_map.IsDev)
}
func onInit() {
@@ -31,11 +34,6 @@ func onInit() {
}
}
//OnIsDev ... 是否是开发版本
func OnIsDev() bool {
return _map.IsDev
}
//InitFile ...
func InitFile(filename string) error {
if _, err := toml.DecodeFile(filename, &_map); err != nil {