func (cmd *Children) Run(c *cli.Context) { entityList := entities.Children(cmd.network, c.Args()[0], c.Args()[1]) table := terminal.NewTable([]string{"Id", "Name", "Type"}) for _, entity := range entityList { table.Add(entity.Id, entity.Name, entity.Type) } table.Print() }
func (cmd *Entity) listentity(application string, entity string) { entitiesList, err := entities.Children(cmd.network, application, entity) if nil != err { error_handler.ErrorExit(err) } table := terminal.NewTable([]string{"Id", "Name", "Type"}) for _, entityitem := range entitiesList { table.Add(entityitem.Id, entityitem.Name, entityitem.Type) } table.Print() }