(h string)
| 196 | } |
| 197 | |
| 198 | func headerKeyValue(h string) (string, string) { |
| 199 | i := strings.Index(h, ":") |
| 200 | if i == -1 { |
| 201 | log.Fatalf("Header '%s' has invalid format, missing ':'", h) |
| 202 | } |
| 203 | return strings.TrimRight(h[:i], " "), strings.TrimLeft(h[i:], " :") |
| 204 | } |
| 205 | |
| 206 | func dialContext(network string) func(ctx context.Context, network, addr string) (net.Conn, error) { |
| 207 | return func(ctx context.Context, _, addr string) (net.Conn, error) { |