From fe403362b4f8f39276b87c6c6262c999689ace90 Mon Sep 17 00:00:00 2001 From: Sebastiaan van Stijn Date: Thu, 8 May 2025 21:56:07 +0200 Subject: [PATCH 1/2] container: State.Wait(): don't use deprecated type The container.WaitCondition type was deprecated in 100102108b2f096cd43165e4522a6314bc16f07c, but this use of the deprecated alias was left behind. Signed-off-by: Sebastiaan van Stijn --- container/state.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/container/state.go b/container/state.go index 9493dfcf48..634b1786f5 100644 --- a/container/state.go +++ b/container/state.go @@ -185,7 +185,7 @@ const ( // be nil and its ExitCode() method will return the container's exit code, // otherwise, the results Err() method will return an error indicating why the // wait operation failed. -func (s *State) Wait(ctx context.Context, condition WaitCondition) <-chan container.StateStatus { +func (s *State) Wait(ctx context.Context, condition container.WaitCondition) <-chan container.StateStatus { s.Lock() defer s.Unlock() From 7957a288599086c84c8004579967e7771075efc9 Mon Sep 17 00:00:00 2001 From: Sebastiaan van Stijn Date: Thu, 8 May 2025 21:59:08 +0200 Subject: [PATCH 2/2] container: remove GoDoc for deprecated aliases. Signed-off-by: Sebastiaan van Stijn --- container/state.go | 11 ----------- 1 file changed, 11 deletions(-) diff --git a/container/state.go b/container/state.go index 634b1786f5..9e87da887c 100644 --- a/container/state.go +++ b/container/state.go @@ -157,17 +157,6 @@ func IsValidStateString(s string) bool { // Deprecated: use [container.WaitCondition] instead. type WaitCondition = container.WaitCondition -// Possible WaitCondition Values. -// -// WaitConditionNotRunning (default) is used to wait for any of the non-running -// states: "created", "exited", "dead", "removing", or "removed". -// -// WaitConditionNextExit is used to wait for the next time the state changes -// to a non-running state. If the state is currently "created" or "exited", -// this would cause Wait() to block until either the container runs and exits -// or is removed. -// -// WaitConditionRemoved is used to wait for the container to be removed. const ( // Deprecated: use [container.WaitConditionNotRunning] instead. WaitConditionNotRunning = container.WaitConditionNotRunning