(ctx context.Context, status int)
| 58 | } |
| 59 | |
| 60 | func SetResponseStatus(ctx context.Context, status int) { |
| 61 | if ctx == nil || status <= 0 { |
| 62 | return |
| 63 | } |
| 64 | holder, ok := ctx.Value(responseStatusKey{}).(*responseStatusHolder) |
| 65 | if !ok || holder == nil { |
| 66 | return |
| 67 | } |
| 68 | holder.status.Store(int32(status)) |
| 69 | } |
| 70 | |
| 71 | func SetResponseHeaders(ctx context.Context, headers http.Header) { |
| 72 | if ctx == nil { |
no outgoing calls
no test coverage detected