isArtifactURL reports whether arg is meant as an artifact URL: an http(s) URL whose path goes on past its issue number. parseArtifactURL decides whether it's a valid one.
(arg string)
| 138 | // URL whose path goes on past its issue number. parseArtifactURL decides |
| 139 | // whether it's a valid one. |
| 140 | func isArtifactURL(arg string) bool { |
| 141 | u, err := url.Parse(arg) |
| 142 | return err == nil && (u.Scheme == "http" || u.Scheme == "https") && pastIssuePath.MatchString(u.Path) |
| 143 | } |
| 144 | |
| 145 | // parseArtifactURLs reads every argument as an artifact URL on the same |
| 146 | // issue. |
no outgoing calls
no test coverage detected