IsGithubDotComURL returns true if the given URL is a github.com URL.
(str string)
| 1386 | |
| 1387 | // IsGithubDotComURL returns true if the given URL is a github.com URL. |
| 1388 | func IsGithubDotComURL(str string) bool { |
| 1389 | str = strings.ToLower(str) |
| 1390 | ghURL, err := url.Parse(str) |
| 1391 | if err != nil { |
| 1392 | return false |
| 1393 | } |
| 1394 | return ghURL.Host == "github.com" |
| 1395 | } |
| 1396 | |
| 1397 | // isRateLimited checks whether an HTTP response indicates a rate |
| 1398 | // limit rather than a genuine authorization failure. It returns |
no test coverage detected