Skip to content

Commit e88621f

Browse files
committed
windows support
* colors worked by changing just one line * ascii characters work already in cmd.exe fixes #7 Signed-off-by: Ahmet Alp Balkan <[email protected]>
1 parent 1799d4c commit e88621f

File tree

3 files changed

+12
-2
lines changed

3 files changed

+12
-2
lines changed

.goreleaser.yml

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,8 +8,9 @@ builds:
88
env:
99
- CGO_ENABLED=0
1010
goos:
11-
- darwin
1211
- linux
12+
- darwin
13+
- windows
1314
goarch:
1415
- amd64
1516

.krew.yaml

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -33,3 +33,12 @@ spec:
3333
- from: "*"
3434
to: "."
3535
bin: kubectl-tree
36+
- selector:
37+
matchLabels:
38+
os: windows
39+
arch: amd64
40+
{{addURIAndSha "https://github.com/ahmetb/kubectl-tree/releases/download/{{ .TagName }}/kubectl-tree_{{ .TagName }}_windows_amd64.tar.gz" .TagName }}
41+
files:
42+
- from: "*"
43+
to: "."
44+
bin: kubectl-tree.exe

cmd/kubectl-tree/tree.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@ func treeView(out io.Writer, objs objectDirectory, obj unstructured.Unstructured
3131
tbl.Separator = " "
3232
tbl.AddRow("NAMESPACE", "NAME", "READY", "REASON", "AGE")
3333
treeViewInner("", tbl, objs, obj)
34-
fmt.Fprintln(out, tbl)
34+
fmt.Fprintln(color.Output, tbl)
3535
}
3636

3737
func treeViewInner(prefix string, tbl *uitable.Table, objs objectDirectory, obj unstructured.Unstructured) {

0 commit comments

Comments
 (0)