pull/2036/head
withchao 2 years ago
parent f0e5c587ad
commit 03e15766ab

@ -110,3 +110,10 @@ func InitConfig(configFolderPath string) error {
return initConfig(&Config.Notification, NotificationFileName, configFolderPath)
}
// todo test
func init() {
Config.LocalCache.Friend.Topic = "friend"
Config.LocalCache.Friend.SlotNum = 500
Config.LocalCache.Friend.SlotSize = 20000
}

@ -16,6 +16,8 @@ package config
import (
_ "embed"
"fmt"
"gopkg.in/yaml.v3"
"reflect"
"testing"
@ -115,3 +117,13 @@ func TestInitConfig(t *testing.T) {
})
}
}
func TestName(t *testing.T) {
Config.LocalCache.Friend.Topic = "friend"
Config.LocalCache.Friend.SlotNum = 500
Config.LocalCache.Friend.SlotSize = 20000
data, _ := yaml.Marshal(&Config)
fmt.Println(string(data))
}

Loading…
Cancel
Save