func (cmd *Entities) Run(c *cli.Context) { entityList := entities.EntityList(cmd.network, c.Args()[0]) table := terminal.NewTable([]string{"Id", "Name", "Type"}) for _, entity := range entityList { table.Add(entity.Id, entity.Name, entity.Type) } table.Print() }
func (cmd *Entity) listapp(application string) { entitiesList, err := entities.EntityList(cmd.network, application) 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() }