Standardise the names of types
Most commands use either a kind, or a more readable spelling of a kind, in their output. To make this easier, this centralises the definition of those names in one place, and lets the command implementations choose whichever they need. Signed-off-by: Michael Bridgen <michael@weave.works>
This commit is contained in:
@@ -75,8 +75,8 @@ func nameColumns(item named, includeNamespace bool) []string {
|
||||
var namespaceHeader = []string{"Namespace"}
|
||||
|
||||
type getCommand struct {
|
||||
headers []string
|
||||
list summarisable
|
||||
names
|
||||
list summarisable
|
||||
}
|
||||
|
||||
func (get getCommand) run(cmd *cobra.Command, args []string) error {
|
||||
@@ -98,7 +98,7 @@ func (get getCommand) run(cmd *cobra.Command, args []string) error {
|
||||
}
|
||||
|
||||
if get.list.len() == 0 {
|
||||
logger.Failuref("no imagerepository objects found in %s namespace", namespace)
|
||||
logger.Failuref("no %s objects found in %s namespace", get.kind, namespace)
|
||||
return nil
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user