From d0ac0acff01dc8834e7829679c3183e59d9af247 Mon Sep 17 00:00:00 2001 From: Sebastiaan van Stijn Date: Fri, 15 Aug 2025 22:16:11 +0200 Subject: [PATCH] opts: deprecate ValidateHost utility The `ValidateHost` option was introduced in [moby@1ba1138] to be used as validation func for the `--host` flag on the daemon in and CLI in [moby@5e3f6e7], but is no longer used since [cli@6f61cf0]. which added support for `ssh://` connections, and required validation elsewhere. [moby@1ba1138]: https://github.com/moby/moby/commit/1ba11384bf82f824b0efbab31aaca439cfba1b4f [moby@5e3f6e7]: https://github.com/moby/moby/commit/5e3f6e7023fbd0cfd1233a99c332801755340cfb [cli@6f61cf0]: https://github.com/docker/cli/commit/6f61cf053afc927379cfef91d241539c36d070f6 Signed-off-by: Sebastiaan van Stijn --- opts/hosts.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/opts/hosts.go b/opts/hosts.go index 552ab6b4a5..87e1a1da75 100644 --- a/opts/hosts.go +++ b/opts/hosts.go @@ -34,7 +34,7 @@ const ( // ValidateHost validates that the specified string is a valid host and returns it. // -// TODO(thaJeztah): ValidateHost appears to be unused; deprecate it. +// Deprecated: this function is no longer used, and will be removed in the next release. func ValidateHost(val string) (string, error) { host := strings.TrimSpace(val) // The empty string means default and is not handled by parseDockerDaemonHost