diff --git a/cli/command/checkpoint/formatter.go b/cli/command/checkpoint/formatter.go index 10706343a546..2bc579dd72fa 100644 --- a/cli/command/checkpoint/formatter.go +++ b/cli/command/checkpoint/formatter.go @@ -10,13 +10,6 @@ const ( checkpointNameHeader = "CHECKPOINT NAME" ) -// NewFormat returns a format for use with a checkpoint Context -// -// Deprecated: this function was only used internally and will be removed in the next release. -func NewFormat(source string) formatter.Format { - return newFormat(source) -} - // newFormat returns a format for use with a checkpointContext. func newFormat(source string) formatter.Format { if source == formatter.TableFormatKey { @@ -25,13 +18,6 @@ func newFormat(source string) formatter.Format { return formatter.Format(source) } -// FormatWrite writes formatted checkpoints using the Context -// -// Deprecated: this function was only used internally and will be removed in the next release. -func FormatWrite(fmtCtx formatter.Context, checkpoints []checkpoint.Summary) error { - return formatWrite(fmtCtx, checkpoints) -} - // formatWrite writes formatted checkpoints using the Context func formatWrite(fmtCtx formatter.Context, checkpoints []checkpoint.Summary) error { render := func(format func(subContext formatter.SubContext) error) error { diff --git a/cli/command/config/formatter.go b/cli/command/config/formatter.go index 046a6e6346e5..f214c961f12d 100644 --- a/cli/command/config/formatter.go +++ b/cli/command/config/formatter.go @@ -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 { diff --git a/cli/command/container/formatter_diff.go b/cli/command/container/formatter_diff.go index 16093f11ced4..a62552b6ffe3 100644 --- a/cli/command/container/formatter_diff.go +++ b/cli/command/container/formatter_diff.go @@ -12,13 +12,6 @@ const ( pathHeader = "PATH" ) -// NewDiffFormat returns a format for use with a diff Context -// -// Deprecated: this function was only used internally and will be removed in the next release. -func NewDiffFormat(source string) formatter.Format { - return newDiffFormat(source) -} - // newDiffFormat returns a format for use with a diff [formatter.Context]. func newDiffFormat(source string) formatter.Format { if source == formatter.TableFormatKey { @@ -27,13 +20,6 @@ func newDiffFormat(source string) formatter.Format { return formatter.Format(source) } -// DiffFormatWrite writes formatted diff using the Context -// -// Deprecated: this function was only used internally and will be removed in the next release. -func DiffFormatWrite(fmtCtx formatter.Context, changes []container.FilesystemChange) error { - return diffFormatWrite(fmtCtx, changes) -} - // diffFormatWrite writes formatted diff using the [formatter.Context]. func diffFormatWrite(fmtCtx formatter.Context, changes []container.FilesystemChange) error { return fmtCtx.Write(newDiffContext(), func(format func(subContext formatter.SubContext) error) error { diff --git a/cli/command/image/formatter_history.go b/cli/command/image/formatter_history.go index 9d6d243fa0eb..0add567b3d32 100644 --- a/cli/command/image/formatter_history.go +++ b/cli/command/image/formatter_history.go @@ -19,13 +19,6 @@ const ( commentHeader = "COMMENT" ) -// NewHistoryFormat returns a format for rendering an HistoryContext -// -// Deprecated: this function was only used internally and will be removed in the next release. -func NewHistoryFormat(source string, quiet bool, human bool) formatter.Format { - return newHistoryFormat(source, quiet, human) -} - // newHistoryFormat returns a format for rendering a historyContext. func newHistoryFormat(source string, quiet bool, human bool) formatter.Format { if source == formatter.TableFormatKey { @@ -42,13 +35,6 @@ func newHistoryFormat(source string, quiet bool, human bool) formatter.Format { return formatter.Format(source) } -// HistoryWrite writes the context -// -// Deprecated: this function was only used internally and will be removed in the next release. -func HistoryWrite(fmtCtx formatter.Context, human bool, histories []image.HistoryResponseItem) error { - return historyWrite(fmtCtx, human, histories) -} - // historyWrite writes the context func historyWrite(fmtCtx formatter.Context, human bool, histories []image.HistoryResponseItem) error { render := func(format func(subContext formatter.SubContext) error) error { diff --git a/cli/command/network/formatter.go b/cli/command/network/formatter.go index 59f97060cfe2..f4568200099d 100644 --- a/cli/command/network/formatter.go +++ b/cli/command/network/formatter.go @@ -17,13 +17,6 @@ const ( internalHeader = "INTERNAL" ) -// NewFormat returns a Format for rendering using a network 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 [formatter.Format] for rendering a networkContext. func newFormat(source string, quiet bool) formatter.Format { switch source { @@ -41,13 +34,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, networks []network.Summary) error { - return formatWrite(fmtCtx, networks) -} - // formatWrite writes the context. func formatWrite(fmtCtx formatter.Context, networks []network.Summary) error { render := func(format func(subContext formatter.SubContext) error) error { diff --git a/cli/command/node/formatter.go b/cli/command/node/formatter.go index 4111494baae5..3ba5b0f8ee0c 100644 --- a/cli/command/node/formatter.go +++ b/cli/command/node/formatter.go @@ -79,13 +79,6 @@ TLS Info: tlsStatusHeader = "TLS STATUS" ) -// NewFormat returns a Format for rendering using a node 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 nodeContext. func newFormat(source string, quiet bool) formatter.Format { switch source { @@ -105,13 +98,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, nodes []swarm.Node, info system.Info) error { - return formatWrite(fmtCtx, nodes, info) -} - // formatWrite writes the context. func formatWrite(fmtCtx formatter.Context, nodes []swarm.Node, info system.Info) error { render := func(format func(subContext formatter.SubContext) error) error { @@ -193,13 +179,6 @@ func (c *nodeContext) EngineVersion() string { return c.n.Description.Engine.EngineVersion } -// InspectFormatWrite renders the context for a list of nodes -// -// 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 nodes. func inspectFormatWrite(fmtCtx formatter.Context, refs []string, getRef inspect.GetRefFunc) error { if fmtCtx.Format != nodeInspectPrettyTemplate { diff --git a/cli/command/plugin/formatter.go b/cli/command/plugin/formatter.go index 4407745eb358..8cf83018beb9 100644 --- a/cli/command/plugin/formatter.go +++ b/cli/command/plugin/formatter.go @@ -20,13 +20,6 @@ enabled: {{.Enabled}} ` ) -// NewFormat returns a Format for rendering using a plugin 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 pluginContext. func newFormat(source string, quiet bool) formatter.Format { switch source { @@ -44,13 +37,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, plugins []*plugin.Plugin) error { - return formatWrite(fmtCtx, plugins) -} - // formatWrite writes the context func formatWrite(fmtCtx formatter.Context, plugins []*plugin.Plugin) error { render := func(format func(subContext formatter.SubContext) error) error { diff --git a/cli/command/registry/formatter_search.go b/cli/command/registry/formatter_search.go index 3a7cb187b95d..4a49f9deadd0 100644 --- a/cli/command/registry/formatter_search.go +++ b/cli/command/registry/formatter_search.go @@ -16,13 +16,6 @@ const ( automatedHeader = "AUTOMATED" ) -// NewSearchFormat returns a Format for rendering using a search Context -// -// Deprecated: this function was only used internally and will be removed in the next release. -func NewSearchFormat(source string) formatter.Format { - return newFormat(source) -} - // newFormat returns a Format for rendering using a searchContext. func newFormat(source string) formatter.Format { switch source { @@ -32,13 +25,6 @@ func newFormat(source string) formatter.Format { return formatter.Format(source) } -// SearchWrite writes the context -// -// Deprecated: this function was only used internally and will be removed in the next release. -func SearchWrite(fmtCtx formatter.Context, results []registrytypes.SearchResult) error { - return formatWrite(fmtCtx, results) -} - // formatWrite writes the context. func formatWrite(fmtCtx formatter.Context, results []registrytypes.SearchResult) error { render := func(format func(subContext formatter.SubContext) error) error { diff --git a/cli/command/secret/formatter.go b/cli/command/secret/formatter.go index 101c4dddb6b0..d5978a001459 100644 --- a/cli/command/secret/formatter.go +++ b/cli/command/secret/formatter.go @@ -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 { diff --git a/cli/command/service/formatter.go b/cli/command/service/formatter.go index 5cf62efb1e98..c87f2624e38b 100644 --- a/cli/command/service/formatter.go +++ b/cli/command/service/formatter.go @@ -195,13 +195,6 @@ Ports: {{- end }} ` -// NewFormat returns a Format for rendering using a Context -// -// Deprecated: this function was only used internally and will be removed in the next release. -func NewFormat(source string) formatter.Format { - return newFormat(source) -} - // newFormat returns a Format for rendering using a Context. func newFormat(source string) formatter.Format { switch source { @@ -224,13 +217,6 @@ func resolveNetworks(service swarm.Service, getNetwork inspect.GetRefFunc) map[s return networkNames } -// InspectFormatWrite renders the context for a list of services -// -// Deprecated: this function was only used internally and will be removed in the next release. -func InspectFormatWrite(fmtCtx formatter.Context, refs []string, getRef, getNetwork inspect.GetRefFunc) error { - return inspectFormatWrite(fmtCtx, refs, getRef, getNetwork) -} - // inspectFormatWrite renders the context for a list of services func inspectFormatWrite(fmtCtx formatter.Context, refs []string, getRef, getNetwork inspect.GetRefFunc) error { if fmtCtx.Format != serviceInspectPrettyTemplate { diff --git a/cli/command/task/formatter.go b/cli/command/task/formatter.go index 7f754e8d95d1..51a19d993ac2 100644 --- a/cli/command/task/formatter.go +++ b/cli/command/task/formatter.go @@ -22,13 +22,6 @@ const ( maxErrLength = 30 ) -// NewTaskFormat returns a Format for rendering using a task Context -// -// Deprecated: this function was only used internally and will be removed in the next release. -func NewTaskFormat(source string, quiet bool) formatter.Format { - return newTaskFormat(source, quiet) -} - // newTaskFormat returns a Format for rendering using a taskContext. func newTaskFormat(source string, quiet bool) formatter.Format { switch source { @@ -46,13 +39,6 @@ func newTaskFormat(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, tasks []swarm.Task, names map[string]string, nodes map[string]string) error { - return formatWrite(fmtCtx, tasks, names, nodes) -} - // formatWrite writes the context. func formatWrite(fmtCtx formatter.Context, tasks []swarm.Task, names map[string]string, nodes map[string]string) error { render := func(format func(subContext formatter.SubContext) error) error { diff --git a/cli/command/trust/formatter.go b/cli/command/trust/formatter.go index e536995fd711..b3f8f1a5aebf 100644 --- a/cli/command/trust/formatter.go +++ b/cli/command/trust/formatter.go @@ -17,14 +17,6 @@ const ( keysHeader = "KEYS" ) -// SignedTagInfo represents all formatted information needed to describe a signed tag: -// Name: name of the signed tag -// Digest: hex encoded digest of the contents -// Signers: list of entities who signed the tag -// -// Deprecated: this type was only used internally and will be removed in the next release. -type SignedTagInfo = signedTagInfo - // signedTagInfo represents all formatted information needed to describe a signed tag: // Name: name of the signed tag // Digest: hex encoded digest of the contents @@ -35,13 +27,6 @@ type signedTagInfo struct { Signers []string } -// SignerInfo represents all formatted information needed to describe a signer: -// Name: name of the signer role -// Keys: the keys associated with the signer -// -// Deprecated: this type was only used internally and will be removed in the next release. -type SignerInfo = signerInfo - // signerInfo represents all formatted information needed to describe a signer: // Name: name of the signer role // Keys: the keys associated with the signer @@ -50,27 +35,6 @@ type signerInfo struct { Keys []string } -// NewTrustTagFormat returns a Format for rendering using a trusted tag Context -// -// Deprecated: this function was only used internally and will be removed in the next release. -func NewTrustTagFormat() formatter.Format { - return defaultTrustTagTableFormat -} - -// NewSignerInfoFormat returns a Format for rendering a signer role info Context -// -// Deprecated: this function was only used internally and will be removed in the next release. -func NewSignerInfoFormat() formatter.Format { - return defaultSignerInfoTableFormat -} - -// TagWrite writes the context -// -// Deprecated: this function was only used internally and will be removed in the next release. -func TagWrite(fmtCtx formatter.Context, signedTagInfoList []signedTagInfo) error { - return tagWrite(fmtCtx, signedTagInfoList) -} - // tagWrite writes the context func tagWrite(fmtCtx formatter.Context, signedTagInfoList []signedTagInfo) error { render := func(format func(subContext formatter.SubContext) error) error { @@ -111,13 +75,6 @@ func (c *trustTagContext) Signers() string { return strings.Join(c.s.Signers, ", ") } -// SignerInfoWrite writes the context -// -// Deprecated: this function was only used internally and will be removed in the next release. -func SignerInfoWrite(fmtCtx formatter.Context, signerInfoList []signerInfo) error { - return signerInfoWrite(fmtCtx, signerInfoList) -} - // signerInfoWrite writes the context. func signerInfoWrite(fmtCtx formatter.Context, signerInfoList []signerInfo) error { render := func(format func(subContext formatter.SubContext) error) error {