Skip to content

Commit a2ead15

Browse files
committed
gofmt
Signed-off-by: Ahmet Alp Balkan <ahmetb@google.com>
1 parent dc8eb1f commit a2ead15

File tree

3 files changed

+6
-6
lines changed

3 files changed

+6
-6
lines changed

cmd/kubectl-tree/apis.go

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -93,9 +93,9 @@ func apiNames(a metav1.APIResource, gv schema.GroupVersion) []string {
9393
shortNames := a.ShortNames
9494
names := append([]string{singularName, pluralName}, shortNames...)
9595
for _, n := range names {
96-
fmtBare := n // e.g. deployment
97-
fmtWithGroup := strings.Join([]string{n, gv.Group},".") // e.g. deployment.apps
98-
fmtWithGroupVersion := strings.Join([]string{n, gv.Version, gv.Group},".") // e.g. deployment.v1.apps
96+
fmtBare := n // e.g. deployment
97+
fmtWithGroup := strings.Join([]string{n, gv.Group}, ".") // e.g. deployment.apps
98+
fmtWithGroupVersion := strings.Join([]string{n, gv.Version, gv.Group}, ".") // e.g. deployment.v1.apps
9999

100100
out = append(out,
101101
fmtBare, fmtWithGroup, fmtWithGroupVersion)

cmd/kubectl-tree/rootcmd.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -70,8 +70,8 @@ func run(cmd *cobra.Command, args []string) error {
7070
strings.Join(names, ", "))
7171
}
7272

73-
ns := *cf.Namespace
74-
if ns == ""{
73+
ns := *cf.Namespace
74+
if ns == "" {
7575
ns = "default" // TODO(ahmetb): how to get current-namespace from kubeconfig?
7676
}
7777
obj, err := dyn.Resource(apiRes[0].GroupVersionResource()).Namespace(ns).Get(name, metav1.GetOptions{})

cmd/kubectl-tree/status.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ func extractStatus(obj unstructured.Unstructured) (ReadyStatus, Reason) {
2727

2828
for _, cond := range conditionsV {
2929
condM, ok := cond.(map[string]interface{})
30-
if !ok {
30+
if !ok {
3131
return "", ""
3232
}
3333
condType, ok := condM["type"].(string)

0 commit comments

Comments
 (0)