🐛 Fixed missing error returns

This commit is contained in:
Maxim Lebedev 2017-09-05 02:12:34 +05:00
parent af1e4b7fa7
commit 08cb7e95ac
No known key found for this signature in database
GPG Key ID: F8978F46FF0FFA4F
2 changed files with 3 additions and 5 deletions

View File

@ -45,9 +45,7 @@ func GetViews(path string, hour, day, month, year int) (*PageViews, error) {
}
var resp PageViews
if err := json.Unmarshal(*body.Result, &resp); err != nil {
return nil, err
}
err = json.Unmarshal(*body.Result, &resp)
return &resp, nil
return &resp, err
}

View File

@ -26,5 +26,5 @@ func (account *Account) RevokeAccessToken() (*Account, error) {
var resp Account
err = json.Unmarshal(*body.Result, &resp)
return &resp, nil
return &resp, err
}