MCPcopy Create free account
hub / github.com/golang/appengine / ExampleClient

Function ExampleClient

remote_api/client_test.go:31–43  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

29}
30
31func ExampleClient() {
32 c, err := NewClient("example.appspot.com", http.DefaultClient)
33 if err != nil {
34 log.Fatal(err)
35 }
36
37 ctx := context.Background() // or from a request
38 ctx = c.NewContext(ctx)
39 _, err = datastore.Put(ctx, datastore.NewIncompleteKey(ctx, "Foo", nil), struct{ Bar int }{42})
40 if err != nil {
41 log.Fatal(err)
42 }
43}

Callers

nothing calls this directly

Calls 4

NewContextMethod · 0.95
PutFunction · 0.92
NewIncompleteKeyFunction · 0.92
NewClientFunction · 0.85

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…