This commit is contained in:
Unknwon 2016-01-04 04:51:12 +08:00
parent 2a795f081a
commit 7830cf2c51

View file

@ -14,7 +14,7 @@ import (
) )
func Version() string { func Version() string {
return "0.7.0" return "0.7.1"
} }
// Client represents a Gogs API client. // Client represents a Gogs API client.
@ -66,7 +66,7 @@ func (c *Client) getResponse(method, path string, header http.Header, body io.Re
return nil, errors.New("404 Not Found") return nil, errors.New("404 Not Found")
} }
if resp.StatusCode%100 != 2 { if resp.StatusCode/100 != 2 {
errMap := make(map[string]interface{}) errMap := make(map[string]interface{})
if err = json.Unmarshal(data, &errMap); err != nil { if err = json.Unmarshal(data, &errMap); err != nil {
return nil, err return nil, err