(ctx context.Context)
| 13 | } |
| 14 | |
| 15 | func headersFromGrpcContext(ctx context.Context) (hs http.Header) { |
| 16 | hs = http.Header{} |
| 17 | |
| 18 | md, ok := metadata.FromIncomingContext(ctx) |
| 19 | if !ok { |
| 20 | // Tests may not have metadata so skip |
| 21 | return |
| 22 | } |
| 23 | |
| 24 | for _, h := range copyHeaders { |
| 25 | if v := md.Get(h); len(v) > 0 { |
| 26 | hs[h] = v |
| 27 | } |
| 28 | } |
| 29 | |
| 30 | return |
| 31 | } |
no test coverage detected