FromFullNameWithHost is like FromFullName that defaults to a specific host for values that don't explicitly include a hostname.
(nwo, fallbackHost string)
| 50 | // FromFullNameWithHost is like FromFullName that defaults to a specific host for values that don't |
| 51 | // explicitly include a hostname. |
| 52 | func FromFullNameWithHost(nwo, fallbackHost string) (Interface, error) { |
| 53 | repo, err := repository.ParseWithHost(nwo, fallbackHost) |
| 54 | if err != nil { |
| 55 | return nil, err |
| 56 | } |
| 57 | return NewWithHost(repo.Owner, repo.Name, repo.Host), nil |
| 58 | } |
| 59 | |
| 60 | // FromURL extracts the GitHub repository information from a git remote URL |
| 61 | func FromURL(u *url.URL) (Interface, error) { |