[ 
https://issues.apache.org/jira/browse/THRIFT-5269?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17183362#comment-17183362
 ] 

Duru Can Celasun commented on THRIFT-5269:
------------------------------------------

Missing where? There are many places where contexts are used. The generated 
service looks fine to me:
{code:java}
type Calculator interface {
  shared.SharedService
  //Ahh, now onto the cool part, defining a service. Services just need a name
  //and can optionally inherit from another service using the extends keyword.  
// A method definition looks like C code. It has a return type, arguments,
  // and optionally a list of exceptions that it may throw. Note that argument
  // lists and exception lists are specified using the exact same syntax as
  // field lists in struct or exception definitions.
  Ping(ctx context.Context) (err error)
  // Parameters:
  //  - Num1
  //  - Num2
  Add(ctx context.Context, num1 int32, num2 int32) (r int32, err error)
  // Parameters:
  //  - Logid
  //  - W
  Calculate(ctx context.Context, logid int32, w *Work) (r int32, err error)
  // This method has a oneway modifier. That means the client only makes
  // a request and does not listen for any response at all. Oneway methods
  // must be void.
  Zip(ctx context.Context) (err error)
}
{code}

> Contexts are missing from GO generated code
> -------------------------------------------
>
>                 Key: THRIFT-5269
>                 URL: https://issues.apache.org/jira/browse/THRIFT-5269
>             Project: Thrift
>          Issue Type: Bug
>          Components: Go - Compiler
>    Affects Versions: 0.13.0
>         Environment: ubuntu, thrift 0.13.0, go 1.14.6
>            Reporter: Paolo Elefante
>            Priority: Blocker
>
> Hi,
> [Contexts|https://golang.org/pkg/context/#Context] are missing from golang 
> generated code.
> I'm on ubuntu, thrift 0.13.0 and go 1.14.6.
> To reproduce the fault just follow the Go Tutorial 
> ([link|https://thrift.apache.org/tutorial/go])
> Thanks. 
> BR, Paolo



--
This message was sent by Atlassian Jira
(v8.3.4#803005)

Reply via email to