(keys []resources.ServiceCredentialBinding)
| 72 | } |
| 73 | |
| 74 | func (cmd ServiceKeysCommand) displayKeysTable(keys []resources.ServiceCredentialBinding) { |
| 75 | table := [][]string{{"name", "last operation", "message"}} |
| 76 | for _, k := range keys { |
| 77 | table = append(table, []string{k.Name, lastOperation(k.LastOperation), k.LastOperation.Description}) |
| 78 | } |
| 79 | |
| 80 | cmd.UI.DisplayTableWithHeader("", table, ui.DefaultTableSpacePadding) |
| 81 | } |
| 82 | |
| 83 | func lastOperation(lo resources.LastOperation) string { |
| 84 | if lo.Type != "" && lo.State != "" { |
no test coverage detected