code: func (bh *Header) RemoveReference(r *Reference) error {
  	if r.id < 0 || int(r.id) >= len(bh.refs) || bh.refs[r.id] != r {
  		return errInvalidReference
  	}
  	bh.refs = append(bh.refs[:r.id], bh.refs[r.id+1:]...)
  	for i := range bh.refs[r.id:] {
  		bh.refs[i+int(r.id)].id--
  	}
  	r.id = -1
  	delete(bh.seenRefs, r.name)
  	return nil
  }
docs: // RemoveReference removes r from the Header and makes it
  // available to add to another Header.