Skip to content

Commit

Permalink
Merge pull request #64 from mausch/master
Browse files Browse the repository at this point in the history
Fix container state as string according to Docker spec
  • Loading branch information
joyrex2001 authored Dec 19, 2023
2 parents befd955 + 8b0fdde commit 5b30566
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions internal/model/types/container.go
Original file line number Diff line number Diff line change
Expand Up @@ -469,18 +469,18 @@ func (co *Container) Match(typ string, key string, val string) bool {
// StateString returns a string that describes the state.
func (co *Container) StateString() string {
if co.Running {
return "Up"
return "running"
}
if co.Stopped || co.Killed {
return "Dead"
return "dead"
}
if co.Failed {
return "Dead"
return "dead"
}
if co.Completed {
return "Exited"
return "exited"
}
return "Created"
return "created"
}

// StatusString returns a string that describes the status.
Expand Down

0 comments on commit 5b30566

Please sign in to comment.