Skip to content

Commit 30774ed

Browse files
committed
deprecate cli/command/stack/formatter
Functions and types in this package were exported as part of the "compose on kubernetes" feature, which was deprecated and removed. These functions are meant for internal use, and will be removed in the next release. Signed-off-by: Sebastiaan van Stijn <[email protected]>
1 parent 306b744 commit 30774ed

File tree

2 files changed

+20
-0
lines changed

2 files changed

+20
-0
lines changed

‎.golangci.yml‎

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -222,6 +222,14 @@ linters:
222222
linters:
223223
- staticcheck
224224

225+
# Ignore deprecation linting for cli/command/stack/*.
226+
#
227+
# FIXME(thaJeztah): remove exception once these functions are un-exported or internal; see https://github.com/docker/cli/pull/6389
228+
- text: '^(SA1019): '
229+
path: "cli/command/stack"
230+
linters:
231+
- staticcheck
232+
225233
# Log a warning if an exclusion rule is unused.
226234
# Default: false
227235
warn-unused: true

‎cli/command/stack/formatter/formatter.go‎

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,21 +8,31 @@ import (
88

99
const (
1010
// SwarmStackTableFormat is the default Swarm stack format
11+
//
12+
// Deprecated: this type was for internal use and will be removed in the next release.
1113
SwarmStackTableFormat formatter.Format = "table {{.Name}}\t{{.Services}}"
1214

1315
stackServicesHeader = "SERVICES"
1416

1517
// TableFormatKey is an alias for formatter.TableFormatKey
18+
//
19+
// Deprecated: this type was for internal use and will be removed in the next release.
1620
TableFormatKey = formatter.TableFormatKey
1721
)
1822

1923
// Context is an alias for formatter.Context
24+
//
25+
// Deprecated: this type was for internal use and will be removed in the next release.
2026
type Context = formatter.Context
2127

2228
// Format is an alias for formatter.Format
29+
//
30+
// Deprecated: this type was for internal use and will be removed in the next release.
2331
type Format = formatter.Format
2432

2533
// Stack contains deployed stack information.
34+
//
35+
// Deprecated: this type was for internal use and will be removed in the next release.
2636
type Stack struct {
2737
// Name is the name of the stack
2838
Name string
@@ -31,6 +41,8 @@ type Stack struct {
3141
}
3242

3343
// StackWrite writes formatted stacks using the Context
44+
//
45+
// Deprecated: this function was for internal use and will be removed in the next release.
3446
func StackWrite(ctx formatter.Context, stacks []*Stack) error {
3547
render := func(format func(subContext formatter.SubContext) error) error {
3648
for _, stack := range stacks {

0 commit comments

Comments
 (0)