Skip to content

Commit

Permalink
Use ConfirmConfigJSON function
Browse files Browse the repository at this point in the history
  • Loading branch information
thrasher- committed Mar 5, 2017
1 parent 255bd12 commit 5347ea8
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
4 changes: 2 additions & 2 deletions config.go
Original file line number Diff line number Diff line change
Expand Up @@ -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
}
Expand All @@ -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
}
Expand Down
4 changes: 2 additions & 2 deletions config_encryption.go
Original file line number Diff line number Diff line change
Expand Up @@ -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 {
Expand Down

0 comments on commit 5347ea8

Please sign in to comment.