func manageRun()

in code/function/function.go [116:133]


func manageRun(ctx context.Context, project, label string) error {
	svc, err := run.NewService(ctx)
	if err != nil {
		return fmt.Errorf("cannot instaitate Cloud Run API service: %s", err)
	}

	runServices, err := runServices(project, svc, label)
	if err != nil {
		return fmt.Errorf("cannot get a list of Cloud Run Services: %s", err)
	}

	if err := runDisable(project, svc, runServices); err != nil {
		return fmt.Errorf("cannot disable Cloud Run Services: %s", err)
	}
	fmt.Printf("Cost Sentry disabled %d Cloud Run Services\n", len(runServices))

	return nil
}