(scheme string, port string)
| 185 | } |
| 186 | |
| 187 | func normalizePort(scheme string, port string) string { |
| 188 | trimmed := strings.TrimSpace(port) |
| 189 | if trimmed != "" { |
| 190 | return trimmed |
| 191 | } |
| 192 | |
| 193 | switch strings.ToLower(strings.TrimSpace(scheme)) { |
| 194 | case "http": |
| 195 | return "80" |
| 196 | case "https": |
| 197 | return "443" |
| 198 | default: |
| 199 | return "" |
| 200 | } |
| 201 | } |
| 202 | |
| 203 | func firstNonEmptyString(values ...string) string { |
| 204 | for _, value := range values { |
no outgoing calls
no test coverage detected