refactor: formatter gets own package
This commit is contained in:
@ -4,14 +4,14 @@ import (
|
||||
"strings"
|
||||
"time"
|
||||
|
||||
abraFormatter "coopcloud.tech/abra/cli/formatter"
|
||||
"coopcloud.tech/abra/cli/internal"
|
||||
"coopcloud.tech/abra/pkg/autocomplete"
|
||||
"coopcloud.tech/abra/pkg/client"
|
||||
"coopcloud.tech/abra/pkg/config"
|
||||
"coopcloud.tech/abra/pkg/formatter"
|
||||
stack "coopcloud.tech/abra/pkg/upstream/stack"
|
||||
"github.com/buger/goterm"
|
||||
"github.com/docker/cli/cli/command/formatter"
|
||||
dockerFormatter "github.com/docker/cli/cli/command/formatter"
|
||||
"github.com/docker/docker/api/types"
|
||||
"github.com/docker/docker/api/types/filters"
|
||||
dockerClient "github.com/docker/docker/client"
|
||||
@ -71,7 +71,7 @@ func showPSOutput(c *cli.Context, app config.App, cl *dockerClient.Client) {
|
||||
}
|
||||
|
||||
tableCol := []string{"image", "created", "status", "state", "ports"}
|
||||
table := abraFormatter.CreateTable(tableCol)
|
||||
table := formatter.CreateTable(tableCol)
|
||||
|
||||
for _, container := range containers {
|
||||
var containerNames []string
|
||||
@ -81,11 +81,11 @@ func showPSOutput(c *cli.Context, app config.App, cl *dockerClient.Client) {
|
||||
}
|
||||
|
||||
tableRow := []string{
|
||||
abraFormatter.RemoveSha(container.Image),
|
||||
abraFormatter.HumanDuration(container.Created),
|
||||
formatter.RemoveSha(container.Image),
|
||||
formatter.HumanDuration(container.Created),
|
||||
container.Status,
|
||||
container.State,
|
||||
formatter.DisplayablePorts(container.Ports),
|
||||
dockerFormatter.DisplayablePorts(container.Ports),
|
||||
}
|
||||
table.Append(tableRow)
|
||||
}
|
||||
|
Reference in New Issue
Block a user