func (vc *verifyReader) Read(b []byte) (int, error) {
	n, err := vc.inner.Read(b)
	if err == io.EOF {
		got := hex.EncodeToString(vc.hasher.Sum(make([]byte, 0, vc.hasher.Size())))
		if want := vc.expected.Hex; got != want {
			return n, fmt.Errorf("error verifying %s checksum; got %q, want %q",
				vc.expected.Algorithm, got, want)
		}
	}
	return n, err
}
Read implements io.Reader
package v1util
import (
	"encoding/hex"
	"fmt"
	"hash"
	"io"
	v1 "github.com/google/go-containerregistry/pkg/v1"
)
type verifyReader struct {
	inner    io.Reader
	hasher   hash.Hash
	expected v1.Hash
}