code: func RegisterCodePipelineEnvironment(environmentName string,
  	environmentVariables map[string]string) error {
  	if _, exists := codePipelineEnvironments[environmentName]; exists {
  		return errors.Errorf("Environment (%s) has already been defined", environmentName)
  	}
  	codePipelineEnvironments[environmentName] = environmentVariables
  	return nil
  }
docs: // RegisterCodePipelineEnvironment is part of a CodePipeline deployment
  // and defines the environments available for deployment. Environments
  // are defined the `environmentName`. The values defined in the
  // environmentVariables are made available to each service as
  // environment variables. The environment key will be transformed into
  // a configuration file for a CodePipeline CloudFormation action:
  // TemplateConfiguration: !Sub "TemplateSource::${environmentName}".