WithState returns a copy of ctx that stores the state value.
(ctx context.Context, state string)
| 17 | |
| 18 | // WithState returns a copy of ctx that stores the state value. |
| 19 | func WithState(ctx context.Context, state string) context.Context { |
| 20 | return context.WithValue(ctx, stateKey, state) |
| 21 | } |
| 22 | |
| 23 | // StateFromContext returns the state value from the ctx. |
| 24 | func StateFromContext(ctx context.Context) (string, error) { |
no outgoing calls