mirror of
https://github.com/moby/moby.git
synced 2026-08-10 17:15:06 +00:00
daemon: deprecate Daemon.IsPaused
This function was poorly documented as it uses fuzzy matching under the hood, and it's no longer used. Mark it as deprecated, and to be removed in the next release. Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
This commit is contained in:
@@ -78,6 +78,8 @@ func (daemon *Daemon) Exists(id string) bool {
|
||||
}
|
||||
|
||||
// IsPaused returns a bool indicating if the specified container is paused.
|
||||
//
|
||||
// Deprecated: use [Daemon.GetContainer] to look up a container by ID, Name, or ID-prefix, and use [container.State.IsPaused]. This function will be removed in the next release.
|
||||
func (daemon *Daemon) IsPaused(id string) bool {
|
||||
c, _ := daemon.GetContainer(id)
|
||||
return c.State.IsPaused()
|
||||
|
||||
Reference in New Issue
Block a user