Skip to content
This repository has been archived by the owner on Jun 13, 2021. It is now read-only.

Standardize column spacing in output #774

Merged
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion cmd/cnab-run/status.go
Original file line number Diff line number Diff line change
Expand Up @@ -179,7 +179,7 @@ func runningServices(cli command.Cli, instanceName string) ([]swarmtypes.Service
}

func printServices(out io.Writer, services []swarmtypes.Service) error {
w := tabwriter.NewWriter(out, 0, 0, 1, ' ', 0)
w := tabwriter.NewWriter(out, 20, 2, 3, ' ', 0)
printHeaders(w)

for _, service := range services {
Expand Down
2 changes: 1 addition & 1 deletion internal/commands/list.go
Original file line number Diff line number Diff line change
Expand Up @@ -106,7 +106,7 @@ func runList(dockerCli command.Cli, opts listOptions, installerContext *cliopts.
return tmpl.Execute(dockerCli.Out(), installations)
}

w := tabwriter.NewWriter(dockerCli.Out(), 0, 0, 1, ' ', 0)
w := tabwriter.NewWriter(dockerCli.Out(), 20, 1, 3, ' ', 0)
printHeaders(w)

for _, installation := range installations {
Expand Down
2 changes: 1 addition & 1 deletion internal/inspect/inspect.go
Original file line number Diff line number Diff line change
Expand Up @@ -280,7 +280,7 @@ func printSection(out io.Writer, len int, printer func(io.Writer), headers ...st
return
}
fmt.Fprintln(out)
w := tabwriter.NewWriter(out, 0, 0, 1, ' ', 0)
w := tabwriter.NewWriter(out, 20, 1, 3, ' ', 0)
fmt.Fprintln(w, strings.Join(headers, "\t"))
printer(w)
w.Flush()
Expand Down
26 changes: 13 additions & 13 deletions internal/inspect/testdata/inspect-bundle-pretty.golden
Original file line number Diff line number Diff line change
Expand Up @@ -8,17 +8,17 @@ maintainers:
email: [email protected]


SERVICE IMAGE
app-watcher watcher
debug busybox:latest
front nginx
monitor busybox:latest
SERVICE IMAGE
app-watcher watcher
debug busybox:latest
front nginx
monitor busybox:latest

PARAMETER VALUE
com.docker.app.args
com.docker.app.inspect-format json
com.docker.app.kubernetes-namespace
com.docker.app.orchestrator
com.docker.app.render-format yaml
com.docker.app.share-registry-creds false
watcher.cmd foo
PARAMETER VALUE
com.docker.app.args
com.docker.app.inspect-format json
com.docker.app.kubernetes-namespace
com.docker.app.orchestrator
com.docker.app.render-format yaml
com.docker.app.share-registry-creds false
watcher.cmd foo
16 changes: 8 additions & 8 deletions internal/inspect/testdata/inspect-full.golden
Original file line number Diff line number Diff line change
Expand Up @@ -6,9 +6,9 @@ maintainers:
email: [email protected]


SERVICE REPLICAS PORTS IMAGE
web1 2 8080-8100 nginx:latest
web2 2 9080-9100 nginx:latest
SERVICE REPLICAS PORTS IMAGE
web1 2 8080-8100 nginx:latest
web2 2 9080-9100 nginx:latest

NETWORK
my-network1
Expand All @@ -22,9 +22,9 @@ SECRET
my-secret1
my-secret2

PARAMETER VALUE
port 8080
text hello
PARAMETER VALUE
port 8080
text hello

ATTACHMENT SIZE
config.cfg 9B
ATTACHMENT SIZE
config.cfg 9B
8 changes: 4 additions & 4 deletions internal/inspect/testdata/inspect-overridden.golden
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,8 @@ description: ""
maintainers: []


SERVICE REPLICAS PORTS IMAGE
web 1 80 nginx
SERVICE REPLICAS PORTS IMAGE
web 1 80 nginx

PARAMETER VALUE
web.port 80
PARAMETER VALUE
web.port 80