code: func (c credentialSet) Add(cred apitypes.CredentialEnvelope) error {
  	if (*cred.Body).GetValue() == nil {
  		return errors.New("Cannot add an unset credential")
  	}
  
  	name := (*cred.Body).GetName()
  	if existing, ok := c[name]; ok {
  		// The new credential is either as specific, or less specific than
  		// the existing one. Keep the existing one.
  		eBody := *existing.Body
  		if (*cred.Body).GetPathExp().CompareSpecificity(eBody.GetPathExp()) != 1 {
  			return nil
  		}
  	}
  
  	c[name] = &cred
  	return nil
  }
docs: // Add adds a credential to the credentialSet, replacing an existing credential
  // of the same name, if the new credential is more specific.
  //
  // If the added credential is an unset value, it is ignored.