remove ctx if possible

This commit is contained in:
Chris Lu
2020-02-25 22:23:59 -08:00
parent ca4ca1ae6f
commit 97ab8a1976
26 changed files with 94 additions and 132 deletions

View File

@@ -60,8 +60,7 @@ func (k *GoCDKPubSub) SendMessage(key string, message proto.Message) error {
if err != nil {
return err
}
ctx := context.Background()
err = k.topic.Send(ctx, &pubsub.Message{
err = k.topic.Send(context.Background(), &pubsub.Message{
Body: bytes,
Metadata: map[string]string{"key": key},
})