runtime: remove unnecessary intermediate type, Status
Signed-off-by: Burcu Dogan <jbd@google.com>
This commit is contained in:
@@ -52,7 +52,7 @@ type Event struct {
|
||||
Status int
|
||||
Signal os.Signal
|
||||
Process *specs.Process
|
||||
State *runtime.State
|
||||
State runtime.State
|
||||
Containers []runtime.Container
|
||||
Checkpoint *runtime.Checkpoint
|
||||
Err chan error
|
||||
|
||||
@@ -12,8 +12,8 @@ func (h *UpdateEvent) Handle(e *Event) error {
|
||||
return ErrContainerNotFound
|
||||
}
|
||||
container := i.container
|
||||
if e.State.Status != "" {
|
||||
switch e.State.Status {
|
||||
if e.State != "" {
|
||||
switch e.State {
|
||||
case runtime.Running:
|
||||
if err := container.Resume(); err != nil {
|
||||
return ErrUnknownContainerStatus
|
||||
|
||||
Reference in New Issue
Block a user