From 4078a44056887e3dfc4c026addf4ce942802e68c Mon Sep 17 00:00:00 2001 From: Paul Holzinger Date: Thu, 22 Feb 2024 13:37:27 +0100 Subject: [PATCH] libpod/events: remove duplicated Details ID field The ID filed in the Event struct is duplicated for no reason, since the Details struct is directly embedded in the Event the ID filed is basically duplicate on the same level multiple times. Removing this one should be be safe and make no change to the resulting json. Signed-off-by: Paul Holzinger --- libpod/events.go | 3 --- libpod/events/config.go | 2 -- 2 files changed, 5 deletions(-) diff --git a/libpod/events.go b/libpod/events.go index 6e862f3676..1ca42ffd74 100644 --- a/libpod/events.go +++ b/libpod/events.go @@ -43,7 +43,6 @@ func (c *Container) newContainerEventWithInspectData(status events.Status, inspe e.Type = events.Container e.Details = events.Details{ - ID: e.ID, PodID: c.PodID(), Attributes: c.Labels(), } @@ -99,7 +98,6 @@ func (c *Container) newContainerExitedEvent(exitCode int32) { e.ContainerExitCode = &intExitCode e.Details = events.Details{ - ID: e.ID, Attributes: c.Labels(), } @@ -121,7 +119,6 @@ func (c *Container) newExecDiedEvent(sessionID string, exitCode int) { e.Attributes["execID"] = sessionID e.Details = events.Details{ - ID: e.ID, Attributes: c.Labels(), } diff --git a/libpod/events/config.go b/libpod/events/config.go index 7b31842097..c67f0daae2 100644 --- a/libpod/events/config.go +++ b/libpod/events/config.go @@ -48,8 +48,6 @@ type Event struct { // Details describes specifics about certain events, specifically around // container events type Details struct { - // ID is the event ID - ID string // ContainerInspectData includes the payload of the container's inspect // data. Only set when events_container_create_inspect_data is set true // in containers.conf.