code: func GenerateNewSecRing(secRing string) (keyID string, err error) {
  	ent, err := NewEntity()
  	if err != nil {
  		return "", fmt.Errorf("generating new identity: %v", err)
  	}
  	if err := os.MkdirAll(filepath.Dir(secRing), 0700); err != nil {
  		return "", err
  	}
  	f, err := wkfs.OpenFile(secRing, os.O_WRONLY|os.O_CREATE|os.O_EXCL, 0600)
  	if err != nil {
  		return "", err
  	}
  	err = WriteKeyRing(f, openpgp.EntityList([]*openpgp.Entity{ent}))
  	if err != nil {
  		f.Close()
  		return "", fmt.Errorf("Could not write new key ring to %s: %v", secRing, err)
  	}
  	if err := f.Close(); err != nil {
  		return "", fmt.Errorf("Could not close %v: %v", secRing, err)
  	}
  	return ent.PrimaryKey.KeyIdString(), nil
  }
docs: // GenerateNewSecRing creates a new secret ring file secRing, with
  // a new GPG identity. It returns the public keyID of that identity.
  // It returns an error if the file already exists.