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

Function callOverrideFromContext

internal/api_common.go:38–48  ·  view source on GitHub ↗
(ctx context.Context)

Source from the content-addressed store, hash-verified

36}
37
38func callOverrideFromContext(ctx context.Context) (CallOverrideFunc, context.Context, bool) {
39 cofs, _ := ctx.Value(&callOverrideKey).([]CallOverrideFunc)
40 if len(cofs) == 0 {
41 return nil, nil, false
42 }
43 // We found a list of overrides; grab the last, and reconstitute a
44 // context that will hide it.
45 f := cofs[len(cofs)-1]
46 ctx = context.WithValue(ctx, &callOverrideKey, cofs[:len(cofs)-1])
47 return f, ctx, true
48}
49
50type logOverrideFunc func(level int64, format string, args ...interface{})
51

Callers 2

CallFunction · 0.70
CallFunction · 0.70

Calls 1

ValueMethod · 0.45

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…