(ctx context.Context)
| 253 | } |
| 254 | |
| 255 | func PersistentConfigWriterFromCtx(ctx context.Context) (pconfig.StorageW, error) { |
| 256 | val := ctx.Value(CtxKeyPersistentConfig) |
| 257 | if val == nil { |
| 258 | return nil, fmt.Errorf("%w: context does not have persistent config writer set", ErrNotFound) |
| 259 | } |
| 260 | |
| 261 | res, valid := val.(pconfig.Storage) |
| 262 | if !valid { |
| 263 | return nil, ErrValueInvalidType |
| 264 | } |
| 265 | |
| 266 | return res, nil |
| 267 | } |
| 268 | |
| 269 | func PersistentConfigFromCtx(ctx context.Context) (pconfig.Storage, error) { |
| 270 | val := ctx.Value(CtxKeyPersistentConfig) |
nothing calls this directly
no outgoing calls
no test coverage detected