code: func callWorkflowHook(hookPhase string,
  	hook WorkflowHook,
  	hooks []WorkflowHookHandler,
  	ctx *workflowContext) error {
  
  	if hook != nil {
  		ctx.logger.Warn(fmt.Sprintf("DEPRECATED: Single %s hook superseded by %ss slice",
  			hookPhase,
  			hookPhase))
  		hooks = append(hooks, WorkflowHookFunc(hook))
  	}
  	for _, eachHook := range hooks {
  		// Run the hook
  		ctx.logger.WithFields(logrus.Fields{
  			"Phase":               hookPhase,
  			"WorkflowHookContext": ctx.context.workflowHooksContext,
  		}).Info("Calling WorkflowHook")
  
  		hookErr := eachHook.DecorateWorkflow(ctx.context.workflowHooksContext,
  			ctx.userdata.serviceName,
  			ctx.userdata.s3Bucket,
  			ctx.userdata.buildID,
  			ctx.context.awsSession,
  			ctx.userdata.noop,
  			ctx.logger)
  		if hookErr != nil {
  			return errors.Wrapf(hookErr, "DecorateWorkflow returned an error")
  		}
  	}
  	return nil
  }
docs: // Encapsulate calling a workflow hook