cancel
Showing results for 
Search instead for 
Did you mean: 

Why "linger" a context.Context in the codegen Go client?

Occasional Visitor

Why "linger" a context.Context in the codegen Go client?

Hi all,

Does anyone know why the go client generates the following code for each API?

// Linger please
var (
_ context.Context
)

The documentation for the context package doesn't mention any behind the scenes machinery that would benefit from this code construct and in fact it strongly implies that programs should not try and store long lived Context objects. I've Googled for this code construct elsewhere and I don't see anything.

Cheers

Cheers,
Lloyd
New Here?
Join us and watch the welcome video:
Announcements