mirror of
https://github.com/moby/moby.git
synced 2026-01-11 02:31:44 +00:00
Merge the two types instead of embedding the ContainerJSONBase. This should have no impact on the API response, but users constructing a response through struct literals will need to update their code. Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
17 lines
470 B
Go
17 lines
470 B
Go
package daemon
|
|
|
|
import (
|
|
"github.com/moby/moby/api/types/container"
|
|
containerpkg "github.com/moby/moby/v2/daemon/container"
|
|
)
|
|
|
|
// This sets platform-specific fields
|
|
func setPlatformSpecificContainerFields(ctr *containerpkg.Container, resp *container.InspectResponse) *container.InspectResponse {
|
|
resp.AppArmorProfile = ctr.AppArmorProfile
|
|
resp.ResolvConfPath = ctr.ResolvConfPath
|
|
resp.HostnamePath = ctr.HostnamePath
|
|
resp.HostsPath = ctr.HostsPath
|
|
|
|
return resp
|
|
}
|