NewContext returns a copy of ctx containing gate. Check it using [Enabled].
(ctx context.Context, gate Gate)
| 130 | |
| 131 | // NewContext returns a copy of ctx containing gate. Check it using [Enabled]. |
| 132 | func 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. |
| 137 | func ShowEnabled(ctx context.Context) string { |
no outgoing calls