DockerCLI/cli/command
Sebastiaan van Stijn be14edca2a
cli/command/stack: fix faulty sort for sorting stacks
This code was updated in 7b9580df51, which
removed support for using kubernetes as orchestrator, but in doing so
made this `sort.Slice` (probably) not do what it was expected to do ':)

    index 412cc2e5ee86..861ae1be2fb9 100644
    @@ -75,8 +54,7 @@ func format(dockerCli command.Cli, opts options.List, orchestrator command.Orche
        }
        sort.Slice(stacks, func(i, j int) bool {
            return sortorder.NaturalLess(stacks[i].Name, stacks[j].Name) ||
    -            !sortorder.NaturalLess(stacks[j].Name, stacks[i].Name) &&
    -            sortorder.NaturalLess(stacks[j].Namespace, stacks[i].Namespace)
    +            !sortorder.NaturalLess(stacks[j].Name, stacks[i].Name)
        })
        return formatter.StackWrite(stackCtx, stacks)
     }

The extra condition was added in 84241cc393
to support multiple namespaces. This patch removes it, bringing it back to
the state it was before that commit.

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2024-07-01 13:19:37 +02:00
..
builder chore: remove backticks and resolve linting issues 2024-04-02 15:54:29 +02:00
checkpoint cli/command: don't use pflags.XXXVarP for flags without shorthand 2024-01-29 11:16:38 +01:00
commands remove exec, push, pull, ps, images, info from "legacy" commands 2022-04-08 16:55:39 +02:00
completion cli/command: use shallower interface for completions 2024-06-04 12:04:11 +02:00
config Update go:build comments to go1.21 2024-06-18 12:17:13 +02:00
container cli/command: Don't copy fakeClient 2024-06-20 14:59:38 +02:00
context Update go:build comments to go1.21 2024-06-18 12:17:13 +02:00
formatter Update go:build comments to go1.21 2024-06-18 12:17:13 +02:00
idresolver Update go:build comments to go1.21 2024-06-18 12:17:13 +02:00
image vendor: github.com/docker/docker 1a1f3cff45ec (master, v27.0-dev) 2024-06-20 13:04:54 +02:00
inspect Update go:build comments to go1.21 2024-06-18 12:17:13 +02:00
manifest Plumb contexts through commands 2023-12-12 22:30:16 +01:00
network Update go:build comments to go1.21 2024-06-18 12:17:13 +02:00
node Update go:build comments to go1.21 2024-06-18 12:17:13 +02:00
plugin Update go:build comments to go1.21 2024-06-18 12:17:13 +02:00
registry Merge pull request #3599 from thaJeztah/use_local_ConvertToHostname 2024-06-20 16:29:30 +02:00
secret Update go:build comments to go1.21 2024-06-18 12:17:13 +02:00
service vendor: github.com/docker/docker 1a1f3cff45ec (master, v27.0-dev) 2024-06-20 13:04:54 +02:00
stack cli/command/stack: fix faulty sort for sorting stacks 2024-07-01 13:19:37 +02:00
swarm Removed all mentions of "please" from docs and messages 2024-06-11 16:53:40 +02:00
system Update go:build comments to go1.21 2024-06-18 12:17:13 +02:00
task linting: address slice-append issues found by gocritic 2023-11-20 16:02:17 +01:00
testdata Dynamically register kubernetes context store endpoint type. 2019-05-20 13:28:11 +01:00
trust Update go:build comments to go1.21 2024-06-18 12:17:13 +02:00
volume Update go:build comments to go1.21 2024-06-18 12:17:13 +02:00
cli.go cli: make initializing the global meter- and tracing providers optional 2024-06-24 15:44:20 +02:00
cli_options.go cli: Wrap Err stream 2024-06-11 17:59:48 +02:00
cli_options_test.go golangci-lint: enable thelper linter 2023-11-20 16:02:17 +01:00
cli_test.go cli: Wrap Err stream 2024-06-11 17:59:48 +02:00
context.go Update go:build comments to go1.21 2024-06-18 12:17:13 +02:00
context_test.go Update go:build comments to go1.21 2024-06-18 12:17:13 +02:00
defaultcontextstore.go Update go:build comments to go1.21 2024-06-18 12:17:13 +02:00
defaultcontextstore_test.go Update go:build comments to go1.21 2024-06-18 12:17:13 +02:00
registry.go use local ConvertToHostname() implementation 2024-06-14 00:25:21 +02:00
registry_test.go linting: fmt.Sprintf can be replaced with string concatenation (perfsprint) 2024-06-10 21:19:32 +02:00
telemetry.go OTel: implement missing MeterProvider `ForceFlush` 2024-05-15 00:05:31 +01:00
telemetry_docker.go Update go:build comments to go1.21 2024-06-18 12:17:13 +02:00
telemetry_options.go cli: make initializing the global meter- and tracing providers optional 2024-06-24 15:44:20 +02:00
telemetry_utils.go cli: Wrap Err stream 2024-06-11 17:59:48 +02:00
telemetry_utils_test.go cli: Wrap Err stream 2024-06-11 17:59:48 +02:00
trust.go Refactor content_trust cli/flags handling 2018-03-08 15:00:43 -05:00
utils.go Update go:build comments to go1.21 2024-06-18 12:17:13 +02:00
utils_test.go feat: global signal handling with context cancellation 2024-06-07 16:56:34 +02:00