Skip to content

Commit 8b01d8e

Browse files
committed
cli/command/stack: runList: remove intermediate slice
This intermediate slice was a left-over from the "Compose on Kubernetes" feature, which required some conversions, but that code was removed in 193ede9, so the intermediate slice no longer has a purpose. Signed-off-by: Sebastiaan van Stijn <[email protected]>
1 parent 047ea37 commit 8b01d8e

File tree

1 file changed

+1
-3
lines changed

1 file changed

+1
-3
lines changed

cli/command/stack/list.go

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -46,12 +46,10 @@ func RunList(ctx context.Context, dockerCLI command.Cli, opts options.List) erro
4646

4747
// runList performs a stack list against the specified swarm cluster
4848
func runList(ctx context.Context, dockerCLI command.Cli, opts listOptions) error {
49-
ss, err := swarm.GetStacks(ctx, dockerCLI.Client())
49+
stacks, err := swarm.GetStacks(ctx, dockerCLI.Client())
5050
if err != nil {
5151
return err
5252
}
53-
stacks := make([]*formatter.Stack, 0, len(ss))
54-
stacks = append(stacks, ss...)
5553
return format(dockerCLI.Out(), opts, stacks)
5654
}
5755

0 commit comments

Comments
 (0)