Skip to content
This repository was archived by the owner on Jul 18, 2025. It is now read-only.

Commit c944c97

Browse files
committed
use nicer imports
Signed-off-by: Nicolas De Loof <[email protected]>
1 parent c833e2e commit c944c97

File tree

2 files changed

+5
-7
lines changed

2 files changed

+5
-7
lines changed

cli/cmd/ps.go

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -23,13 +23,12 @@ import (
2323
"os"
2424
"strings"
2525

26-
formatter3 "github.com/docker/compose-cli/cmd/formatter"
27-
2826
"github.com/pkg/errors"
2927
"github.com/spf13/cobra"
3028

3129
"github.com/docker/compose-cli/api/client"
3230
"github.com/docker/compose-cli/api/containers"
31+
format "github.com/docker/compose-cli/cmd/formatter"
3332
"github.com/docker/compose-cli/utils/formatter"
3433
)
3534

@@ -90,11 +89,11 @@ func runPs(ctx context.Context, opts psOpts) error {
9089
}
9190

9291
if opts.json {
93-
opts.format = formatter3.JSON
92+
opts.format = format.JSON
9493
}
9594

9695
view := viewFromContainerList(containerList)
97-
return formatter3.Print(view, opts.format, os.Stdout, func(w io.Writer) {
96+
return format.Print(view, opts.format, os.Stdout, func(w io.Writer) {
9897
for _, c := range view {
9998
_, _ = fmt.Fprintf(w, "%s\t%s\t%s\t%s\t%s\n", c.ID, c.Image, c.Command, c.Status,
10099
strings.Join(c.Ports, ", "))

cmd/compose/images.go

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -24,12 +24,11 @@ import (
2424
"sort"
2525
"strings"
2626

27-
formatter2 "github.com/docker/compose-cli/cmd/formatter"
28-
2927
"github.com/docker/docker/pkg/stringid"
3028
"github.com/docker/go-units"
3129
"github.com/spf13/cobra"
3230

31+
"github.com/docker/compose-cli/cmd/formatter"
3332
"github.com/docker/compose-cli/pkg/api"
3433
"github.com/docker/compose-cli/pkg/utils"
3534
)
@@ -89,7 +88,7 @@ func runImages(ctx context.Context, backend api.Service, opts imageOptions, serv
8988
return images[i].ContainerName < images[j].ContainerName
9089
})
9190

92-
return formatter2.Print(images, formatter2.PRETTY, os.Stdout,
91+
return formatter.Print(images, formatter.PRETTY, os.Stdout,
9392
func(w io.Writer) {
9493
for _, img := range images {
9594
id := stringid.TruncateID(img.ID)

0 commit comments

Comments
 (0)