Skip to content

Commit d452e56

Browse files
committed
Release: v0.3.7
1 parent 4a0ef25 commit d452e56

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

104 files changed

+14
-18071
lines changed

cmd/main.go

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ import (
88
"github.com/spf13/cobra"
99
)
1010

11-
const version = "0.3.6"
11+
const version = "0.3.7"
1212

1313
var rootCmd *cobra.Command
1414

@@ -35,9 +35,9 @@ func init() {
3535
columns, _ := cmd.Flags().GetString("columns")
3636
format, _ := cmd.Flags().GetString("output-format")
3737
allNamespace, _ := cmd.Flags().GetBool("all-namespaces")
38-
kubeconfig, _ := cmd.Flags().GetString("kubeconfig")
38+
kubeConfig, _ := cmd.Flags().GetString("kubeConfig")
3939
context, _ := cmd.Flags().GetString("context")
40-
kubeImage := kubeimage.NewKubeImage(regx, allNamespace, namespace, columns, kubeconfig, context)
40+
kubeImage := kubeimage.NewKubeImage(regx, allNamespace, namespace, columns, kubeConfig, context)
4141
kubeImage.Render(format)
4242
},
4343
}

kubectl_images.go

Lines changed: 11 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -204,9 +204,9 @@ func (ki *KubeImage) summary() {
204204
containerCnt += 1
205205
}
206206

207-
fmt.Println(fmt.Sprintf("[Summary]: %d namespaces, %d pods, %d containers and %d different images",
207+
fmt.Printf("[Summary]: %d namespaces, %d pods, %d containers and %d different images\n",
208208
namespaceCnt.Count(), podCnt.Count(), containerCnt, imageCnt.Count(),
209-
))
209+
)
210210
}
211211

212212
// Render renders and displays the table output.
@@ -241,11 +241,17 @@ func (ki *KubeImage) Render(format string) {
241241
Image string
242242
ImagePullPolicy string
243243
}
244-
var rec []PodRecord
244+
var records []PodRecord
245245
for _, v := range ki.entities {
246-
rec = append(rec, PodRecord{v.Namespace, v.PodName, v.ContainerName, v.ContainerImage, v.ImagePullPolicy})
246+
records = append(records, PodRecord{
247+
Namespace: v.Namespace,
248+
Pod: v.PodName,
249+
Container: v.ContainerName,
250+
Image: v.ContainerImage,
251+
ImagePullPolicy: v.ImagePullPolicy,
252+
})
247253
}
248-
output, err := json.Marshal(rec)
254+
output, err := json.Marshal(records)
249255
if err != nil {
250256
fmt.Println("[Oh...] failed to marshal JSON data")
251257
return

vendor/github.com/davecgh/go-spew/LICENSE

Lines changed: 0 additions & 15 deletions
This file was deleted.

vendor/github.com/davecgh/go-spew/spew/bypass.go

Lines changed: 0 additions & 145 deletions
This file was deleted.

vendor/github.com/davecgh/go-spew/spew/bypasssafe.go

Lines changed: 0 additions & 38 deletions
This file was deleted.

0 commit comments

Comments
 (0)