update read config

This commit is contained in:
shoopea 2020-01-14 10:35:20 +08:00
parent 01e469b4c3
commit a1a1d35066
2 changed files with 3 additions and 3 deletions

2
obj.go
View File

@ -904,7 +904,7 @@ func getSilentObjItemID(code string, name string) int64 {
}
func loadObjItem2() error {
func loadObjItem() error {
var (
id int64
type_id int64

View File

@ -41,7 +41,7 @@ func PrintText(m *tb.Message) {
return
}
func ReadConfig(path string) {
func ReadConfig(path string) error {
b, err := Asset("data/config.json")
logOnError(err, "readConfig : load data/config.json")
if err != nil {
@ -63,7 +63,7 @@ func ReadConfig(path string) {
b, err = json.Marshal(cfg)
log.Printf("ReadConfig : %s\n", b)
return
return nil
}
func fromChatWarsDate(d string) (t time.Time, err error) {