()
| 39 | } |
| 40 | |
| 41 | func Example_openCollectionFromURL() { |
| 42 | // PRAGMA: This example is used on gocloud.dev; PRAGMA comments adjust how it is shown and can be ignored. |
| 43 | // PRAGMA: On gocloud.dev, add a blank import: _ "gocloud.dev/docstore/awsdynamodb" |
| 44 | // PRAGMA: On gocloud.dev, hide lines until the next blank line. |
| 45 | ctx := context.Background() |
| 46 | |
| 47 | // docstore.OpenCollection creates a *docstore.Collection from a URL. |
| 48 | coll, err := docstore.OpenCollection(ctx, "dynamodb://my-table?partition_key=name") |
| 49 | if err != nil { |
| 50 | log.Fatal(err) |
| 51 | } |
| 52 | defer coll.Close() |
| 53 | } |
nothing calls this directly
no test coverage detected