update map eco/stats

This commit is contained in:
shoopea
2021-12-05 17:08:12 +08:00
parent 0fd89991d7
commit d5bed1eecf
3 changed files with 19 additions and 7 deletions

View File

@@ -4,7 +4,6 @@ import (
_ "embed"
"encoding/json"
"io/ioutil"
"log"
"time"
"github.com/tidwall/pretty"
@@ -57,6 +56,7 @@ func (c *Config) Init() error {
err := json.Unmarshal(cfgSample, &c)
c.Clients = make(map[int]*ClientConfig)
c.Stats = make(map[uint8]map[string]*Stat)
if err != nil {
return err
}
@@ -80,8 +80,6 @@ func (c *Config) Load(path string) error {
return err
}
log.Printf("Stats : %d", len(c.Stats))
return c.Save(path)
}