code: func MainEx(serviceName string,
  	serviceDescription string,
  	lambdaAWSInfos []*LambdaAWSInfo,
  	api *API,
  	site *S3Site,
  	workflowHooks *WorkflowHooks,
  	useCGO bool) error {
  
  	// It's possible the user attached a custom command to the
  	// root command. If there is no command, then just run the
  	// Execute command...
  	CommandLineOptions.Root.PersistentPreRunE = func(cmd *cobra.Command, args []string) error {
  		// This can only run in AWS Lambda
  		formatter := &logrus.JSONFormatter{}
  		logger, loggerErr := NewLoggerWithFormatter("info", formatter)
  		if loggerErr != nil {
  			return loggerErr
  		}
  		if logger == nil {
  			return errors.Errorf("Failed to initialize logger instance")
  		}
  
  		welcomeMessage := fmt.Sprintf("Service: %s", StampedServiceName)
  		logger.WithFields(logrus.Fields{
  			fmt.Sprintf("%sVersion", ProperName): SpartaVersion,
  			fmt.Sprintf("%sSHA", ProperName):     SpartaGitHash[0:7],
  			"go Version":                         runtime.Version(),
  			"BuildID":                            StampedBuildID,
  			"UTC":                                (time.Now().UTC().Format(time.RFC3339)),
  		}).Info(welcomeMessage)
  		OptionsGlobal.ServiceName = StampedServiceName
  		OptionsGlobal.Logger = logger
  		return nil
  	}
  	CommandLineOptions.Root.RunE = func(cmd *cobra.Command, args []string) error {
  		// By default run the Execute command
  		return Execute(StampedServiceName,
  			lambdaAWSInfos,
  			OptionsGlobal.Logger)
  	}
  	return CommandLineOptions.Root.Execute()
  }
docs: // MainEx provides an "extended" Main that supports customizing the standard Sparta
  // workflow via the `workflowHooks` parameter.