MCPcopy Index your code
hub / github.com/cloudfoundry/cli / displayKeysTable

Method displayKeysTable

command/v7/service_keys_command.go:74–81  ·  view source on GitHub ↗
(keys []resources.ServiceCredentialBinding)

Source from the content-addressed store, hash-verified

72}
73
74func (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
83func lastOperation(lo resources.LastOperation) string {
84 if lo.Type != "" && lo.State != "" {

Callers 1

ExecuteMethod · 0.95

Calls 2

lastOperationFunction · 0.70

Tested by

no test coverage detected