This commit is contained in:
Juan Font 2021-08-15 23:35:03 +02:00
parent f194b41435
commit bc2574680d
3 changed files with 12 additions and 4 deletions

View File

@ -101,6 +101,9 @@ var listNamespacesCmd = &cobra.Command{
for _, n := range *namespaces {
d = append(d, []string{strconv.FormatUint(uint64(n.ID), 10), n.Name, n.CreatedAt.Format("2006-01-02 15:04:05")})
}
pterm.DefaultTable.WithHasHeader().WithData(d).Render()
err = pterm.DefaultTable.WithHasHeader().WithData(d).Render()
if err != nil {
log.Fatal(err)
}
},
}

View File

@ -94,8 +94,10 @@ var listNodesCmd = &cobra.Command{
log.Fatalf("Error converting to table: %s", err)
}
pterm.DefaultTable.WithHasHeader().WithData(d).Render()
err = pterm.DefaultTable.WithHasHeader().WithData(d).Render()
if err != nil {
log.Fatal(err)
}
},
}

View File

@ -81,7 +81,10 @@ var listPreAuthKeys = &cobra.Command{
})
}
pterm.DefaultTable.WithHasHeader().WithData(d).Render()
err = pterm.DefaultTable.WithHasHeader().WithData(d).Render()
if err != nil {
log.Fatal(err)
}
},
}