mirror of
https://github.com/containers/podman.git
synced 2025-07-02 08:47:43 +08:00
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:
@ -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(),
|
||||
}
|
||||
|
||||
|
@ -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.
|
||||
|
Reference in New Issue
Block a user