Github user dcelasun commented on a diff in the pull request:
https://github.com/apache/thrift/pull/1309#discussion_r128154321
--- Diff: compiler/cpp/src/thrift/generate/t_go_generator.cc ---
@@ -3746,4 +3746,4 @@ THRIFT_REGISTER_GENERATOR(go, "Go",
" read_write_private\n"
" Make read/write methods
private, default is public Read/Write\n" \
" use_context\n"
- " Make service method
receive a context as first argument.\n")
+ " Make service method
receive a context as first argument, only go1.7+ is supported.\n")
--- End diff --
You do have an explicit dependency to the new `context` package
[here](https://github.com/taozle/thrift/blob/0df5965eb2a35793f19de1b2696e3c4afb6b5132/compiler/cpp/src/thrift/generate/t_go_generator.cc#L887).
What I'm suggesting is to use `x/net/context` there if it's Go<1.7, so you
don't need `use_context` at all.
---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at [email protected] or file a JIRA ticket
with INFRA.
---