Esempio n. 1
0
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()
}
Esempio n. 2
0
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()
}