code: func copyGMSACredSpecToRegistryValue(credSpec string) (string, error) {
  	valueName, err := gMSARegistryValueName()
  	if err != nil {
  		return "", err
  	}
  
  	// write to the registry
  	key, _, err := registryCreateKeyFunc(registry.LOCAL_MACHINE, credentialSpecRegistryLocation, registry.SET_VALUE)
  	if err != nil {
  		return "", fmt.Errorf("unable to open registry key %q: %v", credentialSpecRegistryLocation, err)
  	}
  	defer key.Close()
  	if err = key.SetStringValue(valueName, credSpec); err != nil {
  		return "", fmt.Errorf("unable to write into registry value %q/%q: %v", credentialSpecRegistryLocation, valueName, err)
  	}
  
  	return valueName, nil
  }
docs: // copyGMSACredSpecToRegistryKey copies the credential specs to a unique registry value, and returns its name.