func domainsCallback(table terminal.Table, noDomains *bool) func(models.DomainFields) bool { return func(domain models.DomainFields) bool { table.Print([][]string{{domain.Name, domainStatusString(domain)}}) *noDomains = false return true } }
func domainsCallback(status string, table terminal.Table, noDomains *bool) api.ListDomainsCallback { return api.ListDomainsCallback(func(domains []cf.Domain) bool { rows := [][]string{} for _, domain := range domains { rows = append(rows, []string{domain.Name, status}) } table.Print(rows) *noDomains = false return true }) }