oci/layout/oci_transport.go
func (ref ociReference) getIndex() (*imgspecv1.Index, error) {
	indexJSON, err := os.Open(ref.indexPath())
	if err != nil {
		return nil, err
	}
	defer indexJSON.Close()

	index := &imgspecv1.Index{}
	if err := json.NewDecoder(indexJSON).Decode(index); err != nil {
		return nil, err
	}
	return index, nil
}
func (ref ociReference) getIndex() (*imgspecv1.Index, error) {
	indexJSON, err := os.Open(ref.indexPath())
	if err != nil {
		return nil, err
	}
	defer indexJSON.Close()

	index := &imgspecv1.Index{}
	if err := json.NewDecoder(indexJSON).Decode(index); err != nil {
		return nil, err
	}
	return index, nil
}
// getIndex returns a pointer to the index references by this ociReference. If an error occurs opening an index nil is returned together
// with an error.