Small if err cleaning

Signed-off-by: Antonio Murdaca <me@runcom.ninja>
This commit is contained in:
Antonio Murdaca 2015-04-26 18:50:25 +02:00
parent 54aab2e9b8
commit 9a26753d41
2 changed files with 2 additions and 5 deletions

View file

@ -597,8 +597,7 @@ func (r *Session) SearchRepositories(term string) (*SearchResults, error) {
return nil, httputils.NewHTTPRequestError(fmt.Sprintf("Unexpected status code %d", res.StatusCode), res)
}
result := new(SearchResults)
err = json.NewDecoder(res.Body).Decode(result)
return result, err
return result, json.NewDecoder(res.Body).Decode(result)
}
func (r *Session) GetAuthConfig(withPasswd bool) *cliconfig.AuthConfig {