fix map init

This commit is contained in:
shoopea
2021-12-05 15:48:35 +08:00
parent 6533e87a36
commit 565c7101d8
2 changed files with 5 additions and 4 deletions

View File

@@ -55,6 +55,7 @@ type Config struct {
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
}