Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
14 changes: 0 additions & 14 deletions cli/command/checkpoint/formatter.go
Original file line number Diff line number Diff line change
Expand Up @@ -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 {
Expand All @@ -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 {
Expand Down
21 changes: 0 additions & 21 deletions cli/command/config/formatter.go
Original file line number Diff line number Diff line change
Expand Up @@ -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 {
Expand All @@ -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 {
Expand Down Expand Up @@ -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 {
Expand Down
14 changes: 0 additions & 14 deletions cli/command/container/formatter_diff.go
Original file line number Diff line number Diff line change
Expand Up @@ -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 {
Expand All @@ -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 {
Expand Down
14 changes: 0 additions & 14 deletions cli/command/image/formatter_history.go
Original file line number Diff line number Diff line change
Expand Up @@ -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 {
Expand All @@ -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 {
Expand Down
14 changes: 0 additions & 14 deletions cli/command/network/formatter.go
Original file line number Diff line number Diff line change
Expand Up @@ -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 {
Expand All @@ -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 {
Expand Down
21 changes: 0 additions & 21 deletions cli/command/node/formatter.go
Original file line number Diff line number Diff line change
Expand Up @@ -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 {
Expand All @@ -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 {
Expand Down Expand Up @@ -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 {
Expand Down
14 changes: 0 additions & 14 deletions cli/command/plugin/formatter.go
Original file line number Diff line number Diff line change
Expand Up @@ -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 {
Expand All @@ -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 {
Expand Down
14 changes: 0 additions & 14 deletions cli/command/registry/formatter_search.go
Original file line number Diff line number Diff line change
Expand Up @@ -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 {
Expand All @@ -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 {
Expand Down
21 changes: 0 additions & 21 deletions cli/command/secret/formatter.go
Original file line number Diff line number Diff line change
Expand Up @@ -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 {
Expand All @@ -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 {
Expand Down Expand Up @@ -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 {
Expand Down
14 changes: 0 additions & 14 deletions cli/command/service/formatter.go
Original file line number Diff line number Diff line change
Expand Up @@ -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 {
Expand All @@ -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 {
Expand Down
14 changes: 0 additions & 14 deletions cli/command/task/formatter.go
Original file line number Diff line number Diff line change
Expand Up @@ -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 {
Expand All @@ -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 {
Expand Down
Loading
Loading