code: func NewFromKeyring(keyringfile, id string) (*Signatory, error) {
  	ring, err := loadKeyRing(keyringfile)
  	if err != nil {
  		return nil, err
  	}
  
  	s := &Signatory{KeyRing: ring}
  
  	// If the ID is empty, we can return now.
  	if id == "" {
  		return s, nil
  	}
  
  	// We're gonna go all GnuPG on this and look for a string that _contains_. If
  	// two or more keys contain the string and none are a direct match, we error
  	// out.
  	var candidate *openpgp.Entity
  	vague := false
  	for _, e := range ring {
  		for n := range e.Identities {
  			if n == id {
  				s.Entity = e
  				return s, nil
  			}
  			if strings.Contains(n, id) {
  				if candidate != nil {
  					vague = true
  				}
  				candidate = e
  			}
  		}
  	}
  	if vague {
  		return s, fmt.Errorf("more than one key contain the id %q", id)
  	}
  
  	s.Entity = candidate
  	return s, nil
  }
docs: // NewFromKeyring reads a keyring file and creates a Signatory.
  //
  // If id is not the empty string, this will also try to find an Entity in the
  // keyring whose name matches, and set that as the signing entity. It will return
  // an error if the id is not empty and also not found.