Skip to content

Commit

Permalink
Merge pull request moby#48723 from thaJeztah/daemon_remove_exists_isp…
Browse files Browse the repository at this point in the history
…aused

daemon: remove deprecated Daemon.Exists and Daemon.IsPaused
  • Loading branch information
thaJeztah authored Oct 22, 2024
2 parents 96bb0b4 + 6131322 commit 7f8ef5c
Showing 1 changed file with 0 additions and 17 deletions.
17 changes: 0 additions & 17 deletions daemon/container.go
Original file line number Diff line number Diff line change
Expand Up @@ -68,23 +68,6 @@ func (daemon *Daemon) GetContainer(prefixOrName string) (*container.Container, e
return ctr, nil
}

// Exists returns a true if a container of the specified ID or name exists,
// false otherwise.
//
// Deprecated: use [Daemon.GetContainer] to look up a container by ID, Name, or ID-prefix. This function will be removed in the next release.
func (daemon *Daemon) Exists(id string) bool {
c, _ := daemon.GetContainer(id)
return c != nil
}

// 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()
}

func (daemon *Daemon) containerRoot(id string) string {
return filepath.Join(daemon.repository, id)
}
Expand Down

0 comments on commit 7f8ef5c

Please sign in to comment.