From 692024a18c247d10a0c23ca22b475ec79d6ccd50 Mon Sep 17 00:00:00 2001 From: Sebastiaan van Stijn Date: Tue, 22 Oct 2024 15:18:18 +0200 Subject: [PATCH 1/2] daemon: remove deprecated Daemon.Exists This was deprecated in d47c31ffdd4977ea63cffb8aa97d316dae6fa998, and no longer used. Signed-off-by: Sebastiaan van Stijn --- daemon/container.go | 9 --------- 1 file changed, 9 deletions(-) diff --git a/daemon/container.go b/daemon/container.go index 69178f6d53d34..d68517c22412c 100644 --- a/daemon/container.go +++ b/daemon/container.go @@ -68,15 +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. From 6131322c6fac33a1967224b9677bca2b9adc153d Mon Sep 17 00:00:00 2001 From: Sebastiaan van Stijn Date: Tue, 22 Oct 2024 15:19:22 +0200 Subject: [PATCH 2/2] daemon: remove deprecated Daemon.IsPaused This was deprecated in ac6e32cb5c2cc0620f260c671529c6df445a03df, and no longer used. Signed-off-by: Sebastiaan van Stijn --- daemon/container.go | 8 -------- 1 file changed, 8 deletions(-) diff --git a/daemon/container.go b/daemon/container.go index d68517c22412c..ad6d35225e026 100644 --- a/daemon/container.go +++ b/daemon/container.go @@ -68,14 +68,6 @@ func (daemon *Daemon) GetContainer(prefixOrName string) (*container.Container, e return ctr, 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) }