()
| 52 | type Header map[string][]Secret |
| 53 | |
| 54 | func (h *Header) HTTPHeader() http.Header { |
| 55 | if h == nil || *h == nil { |
| 56 | return nil |
| 57 | } |
| 58 | |
| 59 | header := make(http.Header) |
| 60 | |
| 61 | for name, values := range *h { |
| 62 | var s []string |
| 63 | if values != nil { |
| 64 | s = make([]string, 0, len(values)) |
| 65 | for _, value := range values { |
| 66 | s = append(s, string(value)) |
| 67 | } |
| 68 | } |
| 69 | header[name] = s |
| 70 | } |
| 71 | |
| 72 | return header |
| 73 | } |
| 74 | |
| 75 | // DirectorySetter is a config type that contains file paths that may |
| 76 | // be relative to the file containing the config. |
no outgoing calls