code: func (d *ClientDigestsFile) AddClientRef(plat string, ref *api.ObjectRef) error {
  	if err := common.ValidateObjectRef(ref, common.KnownHash); err != nil {
  		return err
  	}
  	for _, e := range d.entries {
  		if e.plat == plat && e.ref.HashAlgo == ref.HashAlgo {
  			return fmt.Errorf("%s hash for %s has already been added", ref.HashAlgo, plat)
  		}
  	}
  	d.entries = append(d.entries, clientDigestEntry{plat, ref})
  	return nil
  }
docs: // AddClientRef appends the client's digest given as ObjectRef.
  //
  // Returns an error (platform, hash algo) combination has already been added or
  // the hash is unrecognized.