IndexesRootURL builds URL for various indexes
()
| 223 | |
| 224 | // IndexesRootURL builds URL for various indexes |
| 225 | func (repo *RemoteRepo) IndexesRootURL() *url.URL { |
| 226 | var path *url.URL |
| 227 | |
| 228 | if !repo.IsFlat() { |
| 229 | path = &url.URL{Path: fmt.Sprintf("dists/%s/", repo.Distribution)} |
| 230 | } else { |
| 231 | path = &url.URL{Path: repo.Distribution} |
| 232 | } |
| 233 | |
| 234 | return repo.archiveRootURL.ResolveReference(path) |
| 235 | } |
| 236 | |
| 237 | // ReleaseURL returns URL to Release* files in repo root |
| 238 | func (repo *RemoteRepo) ReleaseURL(name string) *url.URL { |