func (cmd *Push) fetchStackGuid(appParams *models.AppParams) { if appParams.StackName == nil { return } stackName := *appParams.StackName cmd.ui.Say("Using stack %s...", terminal.EntityNameColor(stackName)) stack, apiErr := cmd.stackRepo.FindByName(stackName) if apiErr != nil { cmd.ui.Failed(apiErr.Error()) return } cmd.ui.Ok() appParams.StackGuid = &stack.Guid }
func (cmd *Push) fetchStackGuid(appParams *models.AppParams) { if appParams.StackName == nil { return } stackName := *appParams.StackName cmd.ui.Say("Using stack %s...", terminal.EntityNameColor(stackName)) stack, apiResponse := cmd.stackRepo.FindByName(stackName) if apiResponse.IsNotSuccessful() { cmd.ui.Failed(apiResponse.Message) return } cmd.ui.Ok() appParams.StackGuid = &stack.Guid }