(ctx context.Context, s store.Store)
| 26 | type storeCtxKey struct{} |
| 27 | |
| 28 | func WithStore(ctx context.Context, s store.Store) context.Context { |
| 29 | return context.WithValue(ctx, storeCtxKey{}, s) |
| 30 | } |
| 31 | |
| 32 | func StoreFrom(ctx context.Context) (store.Store, error) { |
| 33 | s, ok := ctx.Value(storeCtxKey{}).(store.Store) |
no outgoing calls