code: func (actor *Actor) SetEnvironmentVariableByApplicationNameAndSpace(appName string, spaceGUID string, envPair EnvironmentVariablePair) (Warnings, error) {
  	app, warnings, err := actor.GetApplicationByNameAndSpace(appName, spaceGUID)
  	if err != nil {
  		return warnings, err
  	}
  
  	_, v3Warnings, apiErr := actor.CloudControllerClient.UpdateApplicationEnvironmentVariables(
  		app.GUID,
  		ccv3.EnvironmentVariables{
  			envPair.Key: {Value: envPair.Value, IsSet: true},
  		})
  	warnings = append(warnings, v3Warnings...)
  	return warnings, apiErr
  }
docs: // SetEnvironmentVariableByApplicationNameAndSpace adds an
  // EnvironmentVariablePair to an application. It must be restarted for changes
  // to take effect.