Trying to get Pub/Sub working in AppEngine Standard Environment. Having problems getting the right context. The Pub/Sub client wants a context.Context
but AppEngine only has appengine.Context
. Can't find any examples or anything related to this, except for flexible environment (using context.Background
) which I don't want to use. Am I the only person on the planet wanting to use Pub/Sub with AppEngine Standard Environment?
Ultimately I was using the wrong appengine
. As of now, I have to import google.golang.org/appengine
like the examples for Go 1.9. This is because I was providing appengine.context
when I needed context.Context
.
context.Context
was introduced in Go 1.7 (2016). appengine.NewContext
was changed to return context.Context
in 2017.