Exemple #1
0
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
	}
}
Exemple #2
0
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
	})
}