gotsrpc icon indicating copy to clipboard operation
gotsrpc copied to clipboard

Implement context.Context

Open SchumacherFM opened this issue 5 years ago • 0 comments

If a service type has this function signature:

func (s *Service) FindAllPackages(ctx context.Context[,args T]) ([]*Package, *services.ServiceError) {

the generated code should look like:

case "FindAllPackages":
	executionStart := time.Now()
	findAllPackagesRet, findAllPackagesRet_1 := p.service.FindAllPackages(r.Context() [,args T])

Further info about context: https://blog.golang.org/context

SchumacherFM avatar Aug 15 '19 12:08 SchumacherFM