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

Function ExampleOpenCollection

docstore/awsdynamodb/v2/example_test.go:27–39  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

25)
26
27func ExampleOpenCollection() {
28 // PRAGMA: This example is used on gocloud.dev; PRAGMA comments adjust how it is shown and can be ignored.
29 cfg, err := config.LoadDefaultConfig(context.Background())
30 if err != nil {
31 log.Fatal(err)
32 }
33 coll, err := awsdynamodb.OpenCollection(
34 dynamodb.NewFromConfig(cfg), "docstore-test", "partitionKeyField", "", nil)
35 if err != nil {
36 log.Fatal(err)
37 }
38 defer coll.Close()
39}
40
41func Example_openCollectionFromURL() {
42 // 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

OpenCollectionMethod · 0.80
CloseMethod · 0.65

Tested by

no test coverage detected