getLogContext returns a log context possibly extending from previous context.
(ctx context.Context)
| 188 | |
| 189 | // getLogContext returns a log context possibly extending from previous context. |
| 190 | func getLogCtx(ctx context.Context) LogContext { |
| 191 | parentLogCtx, ok := ctx.Value(requestContextKey).(*LogContext) |
| 192 | if !ok { |
| 193 | return LogContext{} |
| 194 | } |
| 195 | return parentLogCtx.getCopy() |
| 196 | } |
| 197 | |
| 198 | // BucketNameCtx extends the parent context with a bucket name. |
| 199 | func BucketNameCtx(parent context.Context, bucketName string) context.Context { |
no test coverage detected