mirror of
https://tangled.org/evan.jarrett.net/at-container-registry
synced 2026-09-08 19:27:06 +00:00
lint
This commit is contained in:
@@ -234,12 +234,12 @@ func (h *RepositoryPageHandler) ServeHTTP(w http.ResponseWriter, r *http.Request
|
||||
var scanDigests []string
|
||||
var scanHoldEndpoint string
|
||||
for _, m := range manifests {
|
||||
if !m.IsManifestList && m.Manifest.HoldEndpoint != "" {
|
||||
if !m.IsManifestList && m.HoldEndpoint != "" {
|
||||
if scanHoldEndpoint == "" {
|
||||
scanHoldEndpoint = m.Manifest.HoldEndpoint
|
||||
scanHoldEndpoint = m.HoldEndpoint
|
||||
}
|
||||
if m.Manifest.HoldEndpoint == scanHoldEndpoint {
|
||||
scanDigests = append(scanDigests, strings.TrimPrefix(m.Manifest.Digest, "sha256:"))
|
||||
if m.HoldEndpoint == scanHoldEndpoint {
|
||||
scanDigests = append(scanDigests, strings.TrimPrefix(m.Digest, "sha256:"))
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -274,18 +274,18 @@ func (h *RepositoryPageHandler) ServeHTTP(w http.ResponseWriter, r *http.Request
|
||||
|
||||
data := struct {
|
||||
PageData
|
||||
Meta *PageMeta
|
||||
Owner *db.User // Repository owner
|
||||
Repository *db.Repository // Repository summary
|
||||
Tags []db.TagWithPlatforms // Tags with platform info
|
||||
Manifests []db.ManifestWithMetadata // Top-level manifests only
|
||||
StarCount int
|
||||
PullCount int
|
||||
IsStarred bool
|
||||
IsOwner bool // Whether current user owns this repository
|
||||
ReadmeHTML template.HTML
|
||||
ArtifactType string // Dominant artifact type: container-image, helm-chart, unknown
|
||||
ScanBatchParams template.HTML // Pre-encoded query string for batch scan-result endpoint
|
||||
Meta *PageMeta
|
||||
Owner *db.User // Repository owner
|
||||
Repository *db.Repository // Repository summary
|
||||
Tags []db.TagWithPlatforms // Tags with platform info
|
||||
Manifests []db.ManifestWithMetadata // Top-level manifests only
|
||||
StarCount int
|
||||
PullCount int
|
||||
IsStarred bool
|
||||
IsOwner bool // Whether current user owns this repository
|
||||
ReadmeHTML template.HTML
|
||||
ArtifactType string // Dominant artifact type: container-image, helm-chart, unknown
|
||||
ScanBatchParams template.HTML // Pre-encoded query string for batch scan-result endpoint
|
||||
}{
|
||||
PageData: NewPageData(r, &h.BaseUIHandler),
|
||||
Meta: meta,
|
||||
|
||||
Reference in New Issue
Block a user