forked from google/go-github
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add support for context package to all endpoints. (google#529)
This is a large breaking API change. It is unavoidable and necessary to resolve google#526. This breaking change is part of bump to libraryVersion 3. It adds ctx context.Context as first parameter to all endpoint methods, including Do. Updating for this API change should be easy and the compiler will help catch instances that need to be updated. For example: main.go:193: not enough arguments in call to gh.Activity.MarkRepositoryNotificationsRead have (string, string, time.Time) want (context.Context, string, string, time.Time) ... You should pass the available context as first parameter. If your code does not have context.Context available and you want to maintain previous normal behavior, use context.Background(). Don't pass nil context; use context.TODO() instead if you wish to delay figuring out the best context to use. Then you can address the TODO at a later time. Refer to documentation of package context at https://godoc.org/context for more information. This commit also changes ./tests/fields to use context.Background() instead of deprecated oauth2.NoContext. Resolves google#526.
- Loading branch information
Showing
127 changed files
with
1,497 additions
and
1,298 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.