in cmd/cloudshell_open/cloudrun.go [55:73]
func promptDeploymentRegion(ctx context.Context, project string) (string, error) {
locations, err := projectRunLocations(ctx, project)
if err != nil {
return "", fmt.Errorf("cannot retrieve Cloud Run locations: %+v", err)
}
var choice string
if err := survey.AskOne(&survey.Select{
Message: "Choose a region to deploy this application:",
Options: locations,
Default: defaultRunRegion,
}, &choice,
surveyIconOpts,
survey.WithValidator(survey.Required),
); err != nil {
return choice, fmt.Errorf("could not choose a region: %+v", err)
}
return choice, nil
}