MCPcopy Index your code
hub / github.com/google/gapid / Get

Function Get

gapis/database/database.go:89–94  ·  view source on GitHub ↗

Get returns the Database attached to the given context.

(ctx context.Context)

Source from the content-addressed store, hash-verified

87
88// Get returns the Database attached to the given context.
89func Get(ctx context.Context) Database {
90 if val := ctx.Value(databaseKey); val != nil {
91 return val.(Database)
92 }
93 panic("database missing from context")
94}
95
96// Put amends a Context by attaching a Database reference to it.
97func Put(ctx context.Context, d Database) context.Context {

Callers 4

StoreFunction · 0.70
ResolveFunction · 0.70
BuildFunction · 0.70
GetOrBuildFunction · 0.70

Calls 1

ValueMethod · 0.45

Tested by

no test coverage detected