-
Notifications
You must be signed in to change notification settings - Fork 17.7k
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
Proposal: add context import path upgrade to go tool fix #17040
Comments
CL https://golang.org/cl/28872 mentions this issue. |
You likely want to remain with the old package for quite a while to support building with Go <1.7. I think perhaps we'd want to do this a year or more from now. |
Agreed, having it off by default seems sensible, but going ahead and putting it in the tool seems like it would be nice for those who explicitly want to upgrade. |
I've updated the CL to require |
cc @bradfitz |
We still ship and use |
But yeah, SGTM. Opt-in sounds good. |
It would be convenient if
go tool fix
had a rule (possibly off by default?) added to upgrade imports of the context package to the new version in the standard library.Here is a CL that I'm using to upgrade my projects: https://go-review.googlesource.com/#/c/28872/
This makes the new rewrites list read as follows:
This isn't strictly the same as some of the other rewrites in the tool because the old context package is still perfectly usable, so maybe it would be best to leave this fix off by default and allow it to be manually specified.
The text was updated successfully, but these errors were encountered: