()
| 24 | ) |
| 25 | |
| 26 | func ExampleNewSubscription() { |
| 27 | // PRAGMA: This example is used on gocloud.dev; PRAGMA comments adjust how it is shown and can be ignored. |
| 28 | // PRAGMA: On gocloud.dev, hide lines until the next blank line. |
| 29 | ctx := context.Background() |
| 30 | |
| 31 | // Construct a *pubsub.Topic. |
| 32 | topic := mempubsub.NewTopic() |
| 33 | defer topic.Shutdown(ctx) |
| 34 | |
| 35 | // Construct a *pubsub.Subscription for the topic. |
| 36 | subscription := mempubsub.NewSubscription(topic, 1*time.Minute /* ack deadline */) |
| 37 | defer subscription.Shutdown(ctx) |
| 38 | } |
| 39 | |
| 40 | func ExampleNewTopic() { |
| 41 | // PRAGMA: This example is used on gocloud.dev; PRAGMA comments adjust how it is shown and can be ignored. |
nothing calls this directly
no test coverage detected