MCPcopy Create free account
hub / github.com/CrunchyData/postgres-operator / NewContext

Function NewContext

internal/feature/features.go:132–134  ·  view source on GitHub ↗

NewContext returns a copy of ctx containing gate. Check it using [Enabled].

(ctx context.Context, gate Gate)

Source from the content-addressed store, hash-verified

130
131// NewContext returns a copy of ctx containing gate. Check it using [Enabled].
132func NewContext(ctx context.Context, gate Gate) context.Context {
133 return context.WithValue(ctx, contextKey{}, gate)
134}
135
136// ShowEnabled returns all the features enabled in the Gate contained in ctx.
137func ShowEnabled(ctx context.Context) string {

Calls

no outgoing calls