Skip to content

Commit 99d4d1f

Browse files
committed
cli/command/container: replace uses of deprecated event.Status field
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
1 parent 398fa5a commit 99d4d1f

1 file changed

Lines changed: 4 additions & 4 deletions

File tree

cli/command/container/utils.go

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -75,8 +75,8 @@ func legacyWaitExitOrRemoved(ctx context.Context, apiClient client.APIClient, co
7575

7676
eventProcessor := func(e events.Message) bool {
7777
stopProcessing := false
78-
switch e.Status {
79-
case "die":
78+
switch e.Action { //nolint:exhaustive // TODO(thaJeztah): make exhaustive
79+
case events.ActionDie:
8080
if v, ok := e.Actor.Attributes["exitCode"]; ok {
8181
code, cerr := strconv.Atoi(v)
8282
if cerr != nil {
@@ -98,10 +98,10 @@ func legacyWaitExitOrRemoved(ctx context.Context, apiClient client.APIClient, co
9898
}
9999
}()
100100
}
101-
case "detach":
101+
case events.ActionDetach:
102102
exitCode = 0
103103
stopProcessing = true
104-
case "destroy":
104+
case events.ActionDestroy:
105105
stopProcessing = true
106106
}
107107
return stopProcessing

0 commit comments

Comments
 (0)