-
Notifications
You must be signed in to change notification settings - Fork 304
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Github方法已不兼容 #17
Comments
这个修改一下就可以了response.Rate.Remaining |
将 func UpdateRate(token string, response *github.Response) (error) {
githubToken := new(GithubToken)
has, err := Engine.Table("github_token").Where("token=?", token).Get(githubToken)
if err == nil && has {
id := githubToken.Id
githubToken.Remaining = response.Rate.Remaining
githubToken.Reset = response.Rate.Reset.Time
githubToken.Limit = response.Rate.Limit
Engine.ID(id).Update(githubToken)
}
return err
} util/githubsearch/gitclient.go:160:文件中相应的地方也要修改
|
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
go build main.go 提示:
x-patrol/models
models/github.go:97:35: response.Remaining undefined (type *github.Response has no field or method Remaining)
models/github.go:98:31: response.Reset undefined (type *github.Response has no field or method Reset)
models/github.go:99:31: response.Limit undefined (type *github.Response has no field or method Limit)
The text was updated successfully, but these errors were encountered: