fix #13
This commit is contained in:
parent
2a795f081a
commit
7830cf2c51
1 changed files with 2 additions and 2 deletions
4
gogs.go
4
gogs.go
|
@ -14,7 +14,7 @@ import (
|
|||
)
|
||||
|
||||
func Version() string {
|
||||
return "0.7.0"
|
||||
return "0.7.1"
|
||||
}
|
||||
|
||||
// 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")
|
||||
}
|
||||
|
||||
if resp.StatusCode%100 != 2 {
|
||||
if resp.StatusCode/100 != 2 {
|
||||
errMap := make(map[string]interface{})
|
||||
if err = json.Unmarshal(data, &errMap); err != nil {
|
||||
return nil, err
|
||||
|
|
Loading…
Reference in a new issue