Skip to content

Commit 4078a44

Browse files
committed
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>
1 parent 8f1cebf commit 4078a44

2 files changed

Lines changed: 0 additions & 5 deletions

File tree

libpod/events.go

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,6 @@ func (c *Container) newContainerEventWithInspectData(status events.Status, inspe
4343
e.Type = events.Container
4444

4545
e.Details = events.Details{
46-
ID: e.ID,
4746
PodID: c.PodID(),
4847
Attributes: c.Labels(),
4948
}
@@ -99,7 +98,6 @@ func (c *Container) newContainerExitedEvent(exitCode int32) {
9998
e.ContainerExitCode = &intExitCode
10099

101100
e.Details = events.Details{
102-
ID: e.ID,
103101
Attributes: c.Labels(),
104102
}
105103

@@ -121,7 +119,6 @@ func (c *Container) newExecDiedEvent(sessionID string, exitCode int) {
121119
e.Attributes["execID"] = sessionID
122120

123121
e.Details = events.Details{
124-
ID: e.ID,
125122
Attributes: c.Labels(),
126123
}
127124

libpod/events/config.go

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -48,8 +48,6 @@ type Event struct {
4848
// Details describes specifics about certain events, specifically around
4949
// container events
5050
type Details struct {
51-
// ID is the event ID
52-
ID string
5351
// ContainerInspectData includes the payload of the container's inspect
5452
// data. Only set when events_container_create_inspect_data is set true
5553
// in containers.conf.

0 commit comments

Comments
 (0)