tlsFailures lists, once each and in order, the hosts whose TLS handshake with ghmock failed, with the reason.
(requests []loggedRequest)
| 117 | // tlsFailures lists, once each and in order, the hosts whose TLS handshake |
| 118 | // with ghmock failed, with the reason. |
| 119 | func tlsFailures(requests []loggedRequest) []string { |
| 120 | seen := map[string]bool{} |
| 121 | var failures []string |
| 122 | for _, e := range requests { |
| 123 | line := e.Host + ": " + e.TLSError |
| 124 | if e.TLSError == "" || seen[line] { |
| 125 | continue |
| 126 | } |
| 127 | seen[line] = true |
| 128 | failures = append(failures, line) |
| 129 | } |
| 130 | return failures |
| 131 | } |
| 132 | |
| 133 | // blockedNames lists, once each and in order, requests ghmock refused because |
| 134 | // they were for another host. |