|
@@ -22,6 +22,8 @@ type SvrConf struct {
|
22
|
22
|
ActionWeight ActionWeight `toml:"action_weight"`
|
23
|
23
|
CombinationActions map[string][]CombinationActionsConf `toml:"combination_actions"`
|
24
|
24
|
SecretKey string `toml:"secret_key"`
|
|
25
|
+ Ip2RegionFile string `toml:"ip2region_file"`
|
|
26
|
+ LogPath string `toml:"log_path"`
|
25
|
27
|
}
|
26
|
28
|
type FlogControlItem struct {
|
27
|
29
|
Percent int `toml:"percent"`
|
|
@@ -46,7 +48,7 @@ var svrConf SvrConf
|
46
|
48
|
var once sync.Once
|
47
|
49
|
|
48
|
50
|
func GetConf() *SvrConf {
|
49
|
|
- once.Do(func () {
|
|
51
|
+ once.Do(func() {
|
50
|
52
|
_, err := toml.DecodeFile("./conf/config.toml", &svrConf)
|
51
|
53
|
if err != nil {
|
52
|
54
|
panic(err)
|