Use ConfirmConfigJSON function

This commit is contained in:
Adrian Gallagher
2017-03-05 19:53:52 +11:00
parent 255bd125c8
commit 5347ea8fa9
2 changed files with 4 additions and 4 deletions

View File

@@ -214,7 +214,7 @@ func ReadConfig() error {
}
if !ConfirmECS(file) {
err := json.Unmarshal(file, &bot.config)
err = ConfirmConfigJSON(file, &bot.config)
if err != nil {
return err
}
@@ -240,7 +240,7 @@ func ReadConfig() error {
return err
}
err = json.Unmarshal(data, &bot.config)
err = ConfirmConfigJSON(data, &bot.config)
if err != nil {
return err
}

View File

@@ -96,8 +96,8 @@ func DecryptConfigFile(configData, key []byte) ([]byte, error) {
return result, nil
}
func ConfirmWalletJSON(file []byte, result interface{}) error {
return JSONDecode(file, result)
func ConfirmConfigJSON(file []byte, result interface{}) error {
return JSONDecode(file, &result)
}
func ConfirmECS(file []byte) bool {