fix new golangci-lint staticcheck warnings

Looks like it picked up new deprecated matches so we need some more
nolint to silence them where we still need them for backwards compat in
the API.

Signed-off-by: Paul Holzinger <pholzing@redhat.com>
This commit is contained in:
Paul Holzinger 2026-09-04 16:40:03 +02:00
parent 53a9bcbe13
commit 3222b4bc25
No known key found for this signature in database
GPG key ID: EB145DD938A3CAF2
4 changed files with 9 additions and 15 deletions

View file

@ -361,8 +361,6 @@ func (c *Container) generateSpec(ctx context.Context) (s *spec.Spec, cleanupFunc
}
overlayOpts = &overlay.Options{
RootUID: backingUID,
RootGID: backingGID,
UpperDirOptionFragment: upperDir,
WorkDirOptionFragment: workDir,
GraphOpts: c.runtime.store.GraphOptions(),
@ -517,8 +515,6 @@ func (c *Container) generateSpec(ctx context.Context) (s *spec.Spec, cleanupFunc
workDir = filepath.Join(contentDir, "work")
}
overlayOpts := &overlay.Options{
RootUID: backingUID,
RootGID: backingGID,
UpperDirOptionFragment: upperDir,
WorkDirOptionFragment: workDir,
GraphOpts: c.runtime.store.GraphOptions(),
@ -588,8 +584,6 @@ func (c *Container) generateSpec(ctx context.Context) (s *spec.Spec, cleanupFunc
var overlayMount spec.Mount
overlayOpts := &overlay.Options{
RootUID: c.RootUID(),
RootGID: c.RootGID(),
GraphOpts: c.runtime.store.GraphOptions(),
ReadOnly: !volume.ReadWrite,
ForceMount: forceOverlayMount,

View file

@ -102,7 +102,7 @@ func SearchImages(w http.ResponseWriter, r *http.Request) {
Description: report.Description,
StarCount: report.Stars,
IsOfficial: toBool(report.Official),
IsAutomated: toBool(report.Automated),
IsAutomated: toBool(report.Automated), //nolint:staticcheck // we still have to support older API versions which set this
}
if isAutomatedDeprecated {
//nolint:staticcheck

View file

@ -106,11 +106,11 @@ func GetDiskUsage(w http.ResponseWriter, r *http.Request) {
}
utils.WriteResponse(w, http.StatusOK, handlers.LegacyDiskUsage{ //nolint:staticcheck // LegacyDiskUsage is deprecated but kept for Docker API compat < v1.52
LayersSize: df.ImagesSize,
Images: legacy,
Containers: ctnrs,
Volumes: vols,
BuildCache: []build.CacheRecord{},
LayersSize: df.ImagesSize, //nolint:staticcheck // we still have to support older API versions which set this
Images: legacy, //nolint:staticcheck // we still have to support older API versions which set this
Containers: ctnrs, //nolint:staticcheck // we still have to support older API versions which set this
Volumes: vols, //nolint:staticcheck // we still have to support older API versions which set this
BuildCache: []build.CacheRecord{}, //nolint:staticcheck // we still have to support older API versions which set this
})
return
}

View file

@ -111,8 +111,8 @@ func ConvertToEntitiesEvent(e libpodEvents.Event) *types.Event {
return &types.Event{
Message: message,
HealthStatus: e.HealthStatus,
Status: e.Status.String(),
ID: e.ID,
From: e.Image,
Status: e.Status.String(), //nolint:staticcheck // we still have to support older API versions which set this
ID: e.ID, //nolint:staticcheck // we still have to support older API versions which set this
From: e.Image, //nolint:staticcheck // we still have to support older API versions which set this
}
}