isHTTPSURL is the local-to-errclass duplicate of internal/auth/transport.go's isValidChallengeURL. Kept local to avoid coupling errclass to internal/auth; the two collapse once the auth transport adopts BuildAPIError directly.
(rawURL string)
| 212 | // isValidChallengeURL. Kept local to avoid coupling errclass to internal/auth; |
| 213 | // the two collapse once the auth transport adopts BuildAPIError directly. |
| 214 | func isHTTPSURL(rawURL string) bool { |
| 215 | if rawURL == "" { |
| 216 | return false |
| 217 | } |
| 218 | u, err := url.Parse(rawURL) |
| 219 | if err != nil { |
| 220 | return false |
| 221 | } |
| 222 | return u.Scheme == "https" |
| 223 | } |
| 224 | |
| 225 | // stringFromAny coerces a map value to string when it is a string, returning "" otherwise. |
| 226 | func stringFromAny(v any) string { |
no outgoing calls
no test coverage detected