daemon: Daemon.getInspectData: inline struct-literals

Also rename the "container" argument, which shadowed an import.

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
This commit is contained in:
Sebastiaan van Stijn
2025-08-26 15:19:26 +02:00
parent 531be96bf9
commit 44972d7427
3 changed files with 61 additions and 61 deletions

View File

@@ -6,11 +6,11 @@ import (
)
// This sets platform-specific fields
func setPlatformSpecificContainerFields(container *containerpkg.Container, contJSONBase *container.ContainerJSONBase) *container.ContainerJSONBase {
contJSONBase.AppArmorProfile = container.AppArmorProfile
contJSONBase.ResolvConfPath = container.ResolvConfPath
contJSONBase.HostnamePath = container.HostnamePath
contJSONBase.HostsPath = container.HostsPath
func setPlatformSpecificContainerFields(ctr *containerpkg.Container, resp *container.ContainerJSONBase) *container.ContainerJSONBase {
resp.AppArmorProfile = ctr.AppArmorProfile
resp.ResolvConfPath = ctr.ResolvConfPath
resp.HostnamePath = ctr.HostnamePath
resp.HostsPath = ctr.HostsPath
return contJSONBase
return resp
}