func LoadIndex(fpath string) (Index, error) {
	if IsHelm3() {
		return loadIndexV3(fpath)
	}
	return loadIndexV2(fpath)
}
LoadIndex loads index from the file.
package helmutil
import (
	"io"
	"os"
)
type Index interface {
	Add(metadata interface{}, filename, baseURL, digest string) error
	AddOrReplace(metadata interface{}, filename, baseURL, digest string) error
	Delete(name, version string) (url string, err error)
	Has(name, version string) bool
	SortEntries()
	MarshalBinary() (data []byte, err error)
	UnmarshalBinary(b []byte) error
	Reader() (io.Reader, error)
	WriteFile(dest string, mode os.FileMode) error
}
func NewIndex() Index {
	if IsHelm3() {
		return newIndexV3()
	}
	return newIndexV2()
}