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

Method fetchStackGUID

cf/commands/application/push.go:517–534  ·  view source on GitHub ↗
(appParams *models.AppParams)

Source from the content-addressed store, hash-verified

515}
516
517func (cmd *Push) fetchStackGUID(appParams *models.AppParams) error {
518 if appParams.StackName == nil {
519 return nil
520 }
521
522 stackName := *appParams.StackName
523 cmd.ui.Say(T("Using stack {{.StackName}}...",
524 map[string]interface{}{"StackName": terminal.EntityNameColor(stackName)}))
525
526 stack, err := cmd.stackRepo.FindByName(stackName)
527 if err != nil {
528 return err
529 }
530
531 cmd.ui.Ok()
532 appParams.StackGUID = &stack.GUID
533 return nil
534}
535
536func (cmd *Push) restart(app models.Application, params models.AppParams, c flags.FlagContext) error {
537 if app.State != T("stopped") {

Callers 1

ExecuteMethod · 0.95

Calls 4

EntityNameColorFunction · 0.92
SayMethod · 0.65
FindByNameMethod · 0.65
OkMethod · 0.65

Tested by

no test coverage detected