Skip to content
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

Restore various FromContext functions #16

Merged
merged 2 commits into from Jul 7, 2017
Merged

Restore various FromContext functions #16

merged 2 commits into from Jul 7, 2017

Conversation

kevinconway
Copy link
Contributor

Set the request context to the one generated for a chain to ensure
calls to FromContext and FromRequest return the same results.

Set the request context to the one generated for a chain to ensure
calls to FromContext and FromRequest for the various other x-libs
will result in using the same context object.
@kevinconway
Copy link
Contributor Author

Ref: #15

@kevinconway
Copy link
Contributor Author

Worth a note, I'm intentionally not accounting for the backwards compat for < 1.7 with this PR because it's only intended as a conversation piece. I imagine, if you want this feature, that you'd want to use a similar go1.7 build tag split between two files like in the other x-libs.

@rs
Copy link
Owner

rs commented Sep 29, 2016

<1.7 compat is not optional otherwise this will break all existing, not yet migrated installations like yours, which is not friendly :)

@kevinconway
Copy link
Contributor Author

@rs Yes, that was intentional. I originally didn't think of a way to introduce the change without shifting around large amounts of code so I was going to let you do it. However, I believe I was able to isolate the one New function into a pre and post go1.7 files with build tags. I believe this approach is consistent with your other libraries.

@rs rs merged commit 1eb70cf into rs:master Jul 7, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants