versionsapi: replace shortname pkg

Signed-off-by: Paul Meyer <49727155+katexochen@users.noreply.github.com>
This commit is contained in:
Paul Meyer 2023-01-05 15:52:57 +01:00
parent f17b40b44a
commit 66f2c446a4
6 changed files with 27 additions and 168 deletions

View file

@ -143,8 +143,14 @@ func (v Version) ListPath(gran Granularity) string {
)
}
// ArtifactURL returns the URL to the artifacts stored for this version.
// The URL points to a directory.
func (v Version) ArtifactURL() string {
return constants.CDNRepositoryURL + "/" + v.ArtifactPath()
}
// ArtifactPath returns the path to the artifacts stored for this version.
// The path points to a directory and is intended to be used for deletion.
// The path points to a directory.
func (v Version) ArtifactPath() string {
return path.Join(
constants.CDNAPIPrefix,