func ExtractImagesFromTarGzMaybeFromGoogleStorage(tarGz string, imageFilenames map[string]struct{}, client *storage.Client) (map[string]image.Image, error) {
	imReader, _, err := MaybeOpenFromGoogleStorage(tarGz, client)
	if err != nil {
		return nil, err
	}
	defer imReader.Close()

	gzr, err := gzip.NewReader(imReader)
	if err != nil {
		return nil, err
	}

	tarReader := tar.NewReader(gzr)

	return ExtractImagesFromTarReader(tarReader, imageFilenames)
}
// ExtractImagesFromTarGzMaybeFromGoogleStorage looks for tarGz (a fully
// qualified path to a .tar.gz file, which may optionally be a Google Storage
// path). If that succeeds, it then looks for imageFilenames within the
// ungzipped untarred file and processes them into image.Image files, which it
// returns in a map with the same names as the input map.
ExtractImagesFromTarGzMaybeFromGoogleStorage looks for tarGz (a fully
qualified path to a .tar.gz file, which may optionally be a Google Storage
path). If that succeeds, it then looks for imageFilenames within the
ungzipped untarred file and processes them into image.Image files, which it
returns in a map with the same names as the input map.
// ExtractImagesFromTarGzMaybeFromGoogleStorage looks for tarGz ( a fully // qualified path to a . tar . gz file which may optionally be a Google Storage // path ) . If that succeeds it then looks for imageFilenames within the // ungzipped untarred file and processes them into image . Image files which it // returns in a map with the same names as the input map .
func ExtractImagesFromTarGzMaybeFromGoogleStorage(tarGz string, imageFilenames map[string]struct{}, client *storage.Client) (map[string]image.Image, error) {
	imReader, _, err := MaybeOpenFromGoogleStorage(tarGz, client)
	if err != nil {
		return nil, err
	}
	defer imReader.Close()
	gzr, err := gzip.NewReader(imReader)
	if err != nil {
		return nil, err
	}
	tarReader := tar.NewReader(gzr)
	return ExtractImagesFromTarReader(tarReader, imageFilenames)
}
func ExtractImagesFromTarGzMaybeFromGoogleStorage ( tarGz string , imageFilenames map [ string ] struct { } , client * storage . Client ) ( map [ string ] image . Image , error ) { imReader , _ , err := MaybeOpenFromGoogleStorage ( tarGz , client ) if err != nil { return nil , err } defer imReader . Close ( ) gzr , err := gzip . NewReader ( imReader ) if err != nil { return nil , err } tarReader := tar . NewReader ( gzr ) return ExtractImagesFromTarReader ( tarReader , imageFilenames ) }
ExtractImagesFromTarGzMaybeFromGoogleStorage looks for tarGz (a fully
qualified path to a .tar.gz file, which may optionally be a Google Storage
path).
ExtractImagesFromTarGzMaybeFromGoogleStorage looks for tarGz ( a fully qualified path to a . tar . gz file which may optionally be a Google Storage path ) .