💩👌 make lint happy

This commit is contained in:
fumiama
2021-08-06 17:44:48 +08:00
parent e477e0b452
commit ce406d8f55
10 changed files with 66 additions and 57 deletions

View File

@@ -2,6 +2,7 @@
package github
import (
"errors"
"fmt"
"io/ioutil"
"net/http"
@@ -90,7 +91,7 @@ func netGet(dest string, header http.Header) ([]byte, error) {
}
if code := resp.StatusCode; code != 200 {
// 如果返回不是200则立刻抛出错误
return nil, fmt.Errorf("code %d", code)
return nil, errors.New(fmt.Sprintf("code %d", code))
}
return body, nil
}