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

Commit d119541

Browse files
Merge pull request #774 from zappy-shu/APP-327-adjust-output-column-spacing
Standardize column spacing in output
2 parents e244826 + 0c20457 commit d119541

File tree

6 files changed

+28
-28
lines changed

6 files changed

+28
-28
lines changed

cmd/cnab-run/status.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -179,7 +179,7 @@ func runningServices(cli command.Cli, instanceName string) ([]swarmtypes.Service
179179
}
180180

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

185185
for _, service := range services {

internal/commands/list.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -106,7 +106,7 @@ func runList(dockerCli command.Cli, opts listOptions, installerContext *cliopts.
106106
return tmpl.Execute(dockerCli.Out(), installations)
107107
}
108108

109-
w := tabwriter.NewWriter(dockerCli.Out(), 0, 0, 1, ' ', 0)
109+
w := tabwriter.NewWriter(dockerCli.Out(), 20, 1, 3, ' ', 0)
110110
printHeaders(w)
111111

112112
for _, installation := range installations {

internal/inspect/inspect.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -280,7 +280,7 @@ func printSection(out io.Writer, len int, printer func(io.Writer), headers ...st
280280
return
281281
}
282282
fmt.Fprintln(out)
283-
w := tabwriter.NewWriter(out, 0, 0, 1, ' ', 0)
283+
w := tabwriter.NewWriter(out, 20, 1, 3, ' ', 0)
284284
fmt.Fprintln(w, strings.Join(headers, "\t"))
285285
printer(w)
286286
w.Flush()

internal/inspect/testdata/inspect-bundle-pretty.golden

Lines changed: 13 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -8,17 +8,17 @@ maintainers:
88
99

1010

11-
SERVICE IMAGE
12-
app-watcher watcher
13-
debug busybox:latest
14-
front nginx
15-
monitor busybox:latest
11+
SERVICE IMAGE
12+
app-watcher watcher
13+
debug busybox:latest
14+
front nginx
15+
monitor busybox:latest
1616

17-
PARAMETER VALUE
18-
com.docker.app.args
19-
com.docker.app.inspect-format json
20-
com.docker.app.kubernetes-namespace
21-
com.docker.app.orchestrator
22-
com.docker.app.render-format yaml
23-
com.docker.app.share-registry-creds false
24-
watcher.cmd foo
17+
PARAMETER VALUE
18+
com.docker.app.args
19+
com.docker.app.inspect-format json
20+
com.docker.app.kubernetes-namespace
21+
com.docker.app.orchestrator
22+
com.docker.app.render-format yaml
23+
com.docker.app.share-registry-creds false
24+
watcher.cmd foo

internal/inspect/testdata/inspect-full.golden

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -6,9 +6,9 @@ maintainers:
66
77

88

9-
SERVICE REPLICAS PORTS IMAGE
10-
web1 2 8080-8100 nginx:latest
11-
web2 2 9080-9100 nginx:latest
9+
SERVICE REPLICAS PORTS IMAGE
10+
web1 2 8080-8100 nginx:latest
11+
web2 2 9080-9100 nginx:latest
1212

1313
NETWORK
1414
my-network1
@@ -22,9 +22,9 @@ SECRET
2222
my-secret1
2323
my-secret2
2424

25-
PARAMETER VALUE
26-
port 8080
27-
text hello
25+
PARAMETER VALUE
26+
port 8080
27+
text hello
2828

29-
ATTACHMENT SIZE
30-
config.cfg 9B
29+
ATTACHMENT SIZE
30+
config.cfg 9B

internal/inspect/testdata/inspect-overridden.golden

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -4,8 +4,8 @@ description: ""
44
maintainers: []
55

66

7-
SERVICE REPLICAS PORTS IMAGE
8-
web 1 80 nginx
7+
SERVICE REPLICAS PORTS IMAGE
8+
web 1 80 nginx
99

10-
PARAMETER VALUE
11-
web.port 80
10+
PARAMETER VALUE
11+
web.port 80

0 commit comments

Comments
 (0)