Skip to content

Conversation

@thaJeztah
Copy link
Member

@thaJeztah thaJeztah commented Aug 6, 2025

relates to:

cli/command: remove prompt utilities that were for internal use

This patch removes the ErrPromptTerminated, DisableInputEcho, PromptForInput, and PromptForConfirmation utilities from the cli/command package. The core functionality of these is still available in the internal/prompt package, which we may make public at some point, but still needs some refining / decoupling.

- What I did

- How I did it

- How to verify it

- Human readable description for the release notes

Go SDK: `cli/command`: remove the `ErrPromptTerminated`, `DisableInputEcho`, `PromptForInput`, and `PromptForConfirmation` utilities. These utilities were for internal use and are no longer used.

- A picture of a cute animal (not mandatory but encouraged)

- The `DisableInputEcho` and `PromptForInput` utilities were added in
  c15ade0 as part of a bug-fix, which
  was part of v28.x. [There are no (publicly visible) users][1] of either.
- The `ErrPromptTerminated` was added in v26.x (originally added in
  10bf91a, later updated in commit
  7c722c0. [It is not used][2]
- The `PromptForConfirmation` was added in [moby@280c872] (docker v1.13.0)
  as part of the `docker <object> prune` subcommands. It was meant for
  internal use but exported to allow re-using it in the `container`,
  `image` (etc.) packages. However, a breaking change to its signature
  was made in 10bf91a. It currently
  does [not appear to have any (public) users][2].

This patch removes the `ErrPromptTerminated`, `DisableInputEcho`,
`PromptForInput`, and `PromptForConfirmation` utilities from the
`cli/command` package. The core functionality of these is still
available in the `internal/prompt` package, which we may make
public at some point, but still needs some refining / decoupling.

[moby@280c872]: moby/moby@280c872
[1]: https://grep.app/search?f.lang=Go&regexp=true&q=%5C.%28DisableInputEcho%7CPromptForInput%29%5C%28
[2]: https://grep.app/search?f.lang=Go&q=%5C.ErrPromptTerminated
[3]: https://grep.app/search?f.lang=Go&q=.PromptForConfirmation%28

Signed-off-by: Sebastiaan van Stijn <[email protected]>
@thaJeztah thaJeztah added this to the 29.0.0 milestone Aug 6, 2025
@thaJeztah thaJeztah added impact/deprecation status/2-code-review area/go-sdk Changes affecting the Go SDK impact/go-sdk Noteworthy (compatibility changes) in the Go SDK labels Aug 6, 2025
@codecov-commenter
Copy link

Codecov Report

✅ All modified and coverable lines are covered by tests.

📢 Thoughts on this report? Let us know!

@thaJeztah thaJeztah merged commit 845870e into docker:master Aug 6, 2025
115 of 118 checks passed
@thaJeztah thaJeztah deleted the remove_prompt_utils branch August 6, 2025 10:30
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

area/go-sdk Changes affecting the Go SDK impact/deprecation impact/go-sdk Noteworthy (compatibility changes) in the Go SDK status/2-code-review

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants