Skip to content

Commit

Permalink
daemon: deprecate Daemon.IsPaused
Browse files Browse the repository at this point in the history
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 <[email protected]>
  • Loading branch information
thaJeztah committed Oct 21, 2024
1 parent d47c31f commit ac6e32c
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions daemon/container.go
Original file line number Diff line number Diff line change
Expand Up @@ -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()
Expand Down

0 comments on commit ac6e32c

Please sign in to comment.