MCPcopy Index your code
hub / github.com/cloudfoundry/multiapps-cli-plugin / printInitialMessage

Function printInitialMessage

commands/mta_operations_command.go:86–102  ·  view source on GitHub ↗
(cfTarget util.CloudFoundryTarget, mtaId string, all bool, last uint)

Source from the content-addressed store, hash-verified

84}
85
86func printInitialMessage(cfTarget util.CloudFoundryTarget, mtaId string, all bool, last uint) {
87 var initialMessage string
88 switch {
89 case mtaId != "":
90 initialMessage = "Getting multi-target app operations for %[1]s in org %[3]s / space %[4]s as %[5]s..."
91 case all:
92 initialMessage = "Getting all multi-target app operations in org %[3]s / space %[4]s as %[5]s..."
93 case last == 1:
94 initialMessage = "Getting last multi-target app operation in org %[3]s / space %[4]s as %[5]s..."
95 case last != 0:
96 initialMessage = "Getting last %[2]d multi-target app operations in org %[3]s / space %[4]s as %[5]s..."
97 default:
98 initialMessage = "Getting active multi-target app operations in org %[3]s / space %[4]s as %[5]s..."
99 }
100 ui.Say(initialMessage, terminal.EntityNameColor(mtaId), last, terminal.EntityNameColor(cfTarget.Org.Name),
101 terminal.EntityNameColor(cfTarget.Space.Name), terminal.EntityNameColor(cfTarget.Username))
102}
103
104func getOperationsToPrint(mtaClient mtaclient.MtaClientOperations, mtaId string, last uint, all bool) ([]*models.Operation, error) {
105 var ops []*models.Operation

Callers 1

executeInternalMethod · 0.85

Calls 1

SayFunction · 0.92

Tested by

no test coverage detected