Switch from x/net/context to context#2140
Merged
fcrisciani merged 2 commits intomoby:masterfrom Apr 24, 2018
Merged
Conversation
This version includes "x/net/context" which is fully compatible with the standard Go "context" package, so the two can be mixed together. Signed-off-by: Kir Kolyshkin <kolyshkin@gmail.com>
Since Go 1.7, context is a standard package. Since about Go 1.9 time, all x/net/context provides is a few aliases to types in context, meaning "x/net/context" and "context" can be mixed freely. Some vendored packages still use x/net/context, so vendor entry remains for now. Signed-off-by: Kir Kolyshkin <kolyshkin@gmail.com>
Codecov Report
@@ Coverage Diff @@
## master #2140 +/- ##
=========================================
Coverage ? 40.42%
=========================================
Files ? 139
Lines ? 22488
Branches ? 0
=========================================
Hits ? 9091
Misses ? 12058
Partials ? 1339Continue to review full report at Codecov.
|
This file contains hidden or 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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Since Go 1.7, "context" is a standard package, superceding the "x/net/context". Since Go 1.9, the latter only provides type aliases from the former. Therefore, it makes sense to switch to the standard package, and the change is not disruptive in any sense.
Similar PRs: moby/moby#36904, containerd/containerd#2305