code: func (idx *MemoryIndex) FindOffset(h plumbing.Hash) (int64, error) {
  	if len(idx.FanoutMapping) <= int(h[0]) {
  		return 0, plumbing.ErrObjectNotFound
  	}
  
  	k := idx.FanoutMapping[h[0]]
  	i, ok := idx.findHashIndex(h)
  	if !ok {
  		return 0, plumbing.ErrObjectNotFound
  	}
  
  	offset := idx.getOffset(k, i)
  
  	if !idx.offsetHashIsFull {
  		// Save the offset for reverse lookup
  		if idx.offsetHash == nil {
  			idx.offsetHash = make(map[int64]plumbing.Hash)
  		}
  		idx.offsetHash[int64(offset)] = h
  	}
  
  	return int64(offset), nil
  }
docs: // FindOffset implements the Index interface.