getHeaderCanonical is a shortcut for Header.Get() which bypasses the CanonicalMIMEHeaderKey operation when we know the key is already in canonical form.
(h http.Header, key string)
| 103 | // bypasses the CanonicalMIMEHeaderKey operation when we |
| 104 | // know the key is already in canonical form. |
| 105 | func getHeaderCanonical(h http.Header, key string) string { |
| 106 | if h == nil { |
| 107 | return "" |
| 108 | } |
| 109 | v := h[key] |
| 110 | if len(v) == 0 { |
| 111 | return "" |
| 112 | } |
| 113 | return v[0] |
| 114 | } |
| 115 | |
| 116 | // setHeaderCanonical is a shortcut for Header.Set() which |
| 117 | // bypasses the CanonicalMIMEHeaderKey operation when we |
no outgoing calls
no test coverage detected