func ExtractImageFromTarReader(tarReader *tar.Reader, imageFilename string) (image.Image, error) {
	imgMap := make(map[string]struct{})
	imgMap[imageFilename] = struct{}{}

	imgs, err := ExtractImagesFromTarReader(tarReader, imgMap)
	if err != nil {
		return nil, err
	}

	return imgs[imageFilename], nil
}
// ExtractImageFromTarReader consumes a .tar reader, loops over all files until
// it finds the image with the specified name, and returns that image. This is
// now a thin wrapper over ExtractImagesFromTarReader.
ExtractImageFromTarReader consumes a .tar reader, loops over all files until
it finds the image with the specified name, and returns that image. This is
now a thin wrapper over ExtractImagesFromTarReader.
// ExtractImageFromTarReader consumes a . tar reader loops over all files until // it finds the image with the specified name and returns that image . This is // now a thin wrapper over ExtractImagesFromTarReader .
func ExtractImageFromTarReader(tarReader *tar.Reader, imageFilename string) (image.Image, error) {
	imgMap := make(map[string]struct{})
	imgMap[imageFilename] = struct{}{}
	imgs, err := ExtractImagesFromTarReader(tarReader, imgMap)
	if err != nil {
		return nil, err
	}
	return imgs[imageFilename], nil
}
func ExtractImageFromTarReader ( tarReader * tar . Reader , imageFilename string ) ( image . Image , error ) { imgMap := make ( map [ string ] struct { } ) imgMap [ imageFilename ] = struct { } { } imgs , err := ExtractImagesFromTarReader ( tarReader , imgMap ) if err != nil { return nil , err } return imgs [ imageFilename ] , nil }
ExtractImageFromTarReader consumes a .tar reader, loops over all files until
it finds the image with the specified name, and returns that image.
ExtractImageFromTarReader consumes a . tar reader loops over all files until it finds the image with the specified name and returns that image .