Move "not found" presentation to CLI
This commit is contained in:
@@ -24,8 +24,12 @@ func CobraRunE(cmd *cobra.Command, args []string) (err error) {
|
||||
if !ShowAll {
|
||||
fmt.Printf("%s\n", r.Rootfs)
|
||||
} else {
|
||||
kernelVersion := r.KernelVersion
|
||||
if kernelVersion == "" {
|
||||
kernelVersion = "not found"
|
||||
}
|
||||
fmt.Printf("Name: %s\n", r.Name)
|
||||
fmt.Printf("KernelVersion: %s\n", r.KernelVersion)
|
||||
fmt.Printf("KernelVersion: %s\n", kernelVersion)
|
||||
fmt.Printf("Rootfs: %s\n", r.Rootfs)
|
||||
fmt.Printf("Nr nodes: %d\n", len(r.Nodes))
|
||||
fmt.Printf("Nodes: %s\n", r.Nodes)
|
||||
|
||||
@@ -315,9 +315,6 @@ func ContainerShow(csp *wwapiv1.ContainerShowParameter) (response *wwapiv1.Conta
|
||||
rootFsDir := container.RootFsDir(containerName)
|
||||
|
||||
kernelVersion := container.KernelVersion(containerName)
|
||||
if kernelVersion == "" {
|
||||
kernelVersion = "not found"
|
||||
}
|
||||
|
||||
nodeDB, err := node.New()
|
||||
if err != nil {
|
||||
|
||||
Reference in New Issue
Block a user