1
0
mirror of https://github.com/docker/cli.git synced 2026-01-13 18:22:35 +03:00

cli/command/config: remove deprecated formatting functions

These were deprecated in e626f778ec, which
is part of the v28.4 release.

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
This commit is contained in:
Sebastiaan van Stijn
2025-08-22 09:36:11 +02:00
parent e416418e70
commit f969adf63f

View File

@@ -29,13 +29,6 @@ Data:
{{.Data}}`
)
// NewFormat returns a Format for rendering using a config Context
//
// Deprecated: this function was only used internally and will be removed in the next release.
func NewFormat(source string, quiet bool) formatter.Format {
return newFormat(source, quiet)
}
// newFormat returns a Format for rendering using a configContext.
func newFormat(source string, quiet bool) formatter.Format {
switch source {
@@ -50,13 +43,6 @@ func newFormat(source string, quiet bool) formatter.Format {
return formatter.Format(source)
}
// FormatWrite writes the context
//
// Deprecated: this function was only used internally and will be removed in the next release.
func FormatWrite(fmtCtx formatter.Context, configs []swarm.Config) error {
return formatWrite(fmtCtx, configs)
}
// formatWrite writes the context
func formatWrite(fmtCtx formatter.Context, configs []swarm.Config) error {
render := func(format func(subContext formatter.SubContext) error) error {
@@ -128,13 +114,6 @@ func (c *configContext) Label(name string) string {
return c.c.Spec.Annotations.Labels[name]
}
// InspectFormatWrite renders the context for a list of configs
//
// Deprecated: this function was only used internally and will be removed in the next release.
func InspectFormatWrite(fmtCtx formatter.Context, refs []string, getRef inspect.GetRefFunc) error {
return inspectFormatWrite(fmtCtx, refs, getRef)
}
// inspectFormatWrite renders the context for a list of configs
func inspectFormatWrite(fmtCtx formatter.Context, refs []string, getRef inspect.GetRefFunc) error {
if fmtCtx.Format != configInspectPrettyTemplate {