()
| 38 | } |
| 39 | |
| 40 | func ExampleOpenSubscription() { |
| 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 | rabbitConn, err := amqp.Dial("amqp://guest:guest@localhost:5672/") |
| 46 | if err != nil { |
| 47 | log.Fatal(err) |
| 48 | } |
| 49 | defer rabbitConn.Close() |
| 50 | subscription := rabbitpubsub.OpenSubscription(rabbitConn, "myqueue", nil) |
| 51 | defer subscription.Shutdown(ctx) |
| 52 | } |
| 53 | |
| 54 | func Example_openTopicFromURL() { |
| 55 | // 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