cli/command/secret: remove deprecated formatting functions

These were deprecated in f3088e37a0, 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:41:52 +02:00
parent c592932f47
commit 04bcae3a8c

View File

@ -28,13 +28,6 @@ Created at: {{.CreatedAt}}
Updated at: {{.UpdatedAt}}`
)
// NewFormat returns a Format for rendering using a secret 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 secretContext.
func newFormat(source string, quiet bool) formatter.Format {
switch source {
@ -49,13 +42,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, secrets []swarm.Secret) error {
return formatWrite(fmtCtx, secrets)
}
// formatWrite writes the context
func formatWrite(fmtCtx formatter.Context, secrets []swarm.Secret) error {
render := func(format func(subContext formatter.SubContext) error) error {
@ -135,13 +121,6 @@ func (c *secretContext) Label(name string) string {
return c.s.Spec.Annotations.Labels[name]
}
// InspectFormatWrite renders the context for a list of secrets
//
// 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 secrets.
func inspectFormatWrite(fmtCtx formatter.Context, refs []string, getRef inspect.GetRefFunc) error {
if fmtCtx.Format != secretInspectPrettyTemplate {