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 <pholzing@redhat.com>
This commit is contained in:
Paul Holzinger
2024-02-22 13:37:27 +01:00
parent 8f1cebf96f
commit 4078a44056
2 changed files with 0 additions and 5 deletions

View File

@ -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(),
}

View File

@ -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.