update read config
This commit is contained in:
parent
01e469b4c3
commit
a1a1d35066
2
obj.go
2
obj.go
@ -904,7 +904,7 @@ func getSilentObjItemID(code string, name string) int64 {
|
|||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
func loadObjItem2() error {
|
func loadObjItem() error {
|
||||||
var (
|
var (
|
||||||
id int64
|
id int64
|
||||||
type_id int64
|
type_id int64
|
||||||
|
4
utils.go
4
utils.go
@ -41,7 +41,7 @@ func PrintText(m *tb.Message) {
|
|||||||
return
|
return
|
||||||
}
|
}
|
||||||
|
|
||||||
func ReadConfig(path string) {
|
func ReadConfig(path string) error {
|
||||||
b, err := Asset("data/config.json")
|
b, err := Asset("data/config.json")
|
||||||
logOnError(err, "readConfig : load data/config.json")
|
logOnError(err, "readConfig : load data/config.json")
|
||||||
if err != nil {
|
if err != nil {
|
||||||
@ -63,7 +63,7 @@ func ReadConfig(path string) {
|
|||||||
b, err = json.Marshal(cfg)
|
b, err = json.Marshal(cfg)
|
||||||
log.Printf("ReadConfig : %s\n", b)
|
log.Printf("ReadConfig : %s\n", b)
|
||||||
|
|
||||||
return
|
return nil
|
||||||
}
|
}
|
||||||
|
|
||||||
func fromChatWarsDate(d string) (t time.Time, err error) {
|
func fromChatWarsDate(d string) (t time.Time, err error) {
|
||||||
|
Loading…
Reference in New Issue
Block a user