MCPcopy Create free account
hub / github.com/google/go-cloud / ExampleNewTopic

Function ExampleNewTopic

pubsub/mempubsub/example_test.go:40–47  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

38}
39
40func ExampleNewTopic() {
41 // PRAGMA: This example is used on gocloud.dev; PRAGMA comments adjust how it is shown and can be ignored.
42 // PRAGMA: On gocloud.dev, hide lines until the next blank line.
43 ctx := context.Background()
44
45 topic := mempubsub.NewTopic()
46 defer topic.Shutdown(ctx)
47}
48
49func Example_openSubscriptionFromURL() {
50 // PRAGMA: This example is used on gocloud.dev; PRAGMA comments adjust how it is shown and can be ignored.

Callers

nothing calls this directly

Calls 2

ShutdownMethod · 0.95
NewTopicFunction · 0.92

Tested by

no test coverage detected