zip

package
v1.1.64 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Aug 7, 2023 License: MIT Imports: 12 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	ErrNotFound = errors.New("not found")
)

Functions

func DownloadTarGZFile added in v1.1.20

func DownloadTarGZFile(getFn HTTPGetFunc, url string) (*tar.Reader, error)

DownloadTarGZFile downloads a .tar.gz file from the given url and returns a zip.Reader The getFn matches the signature of http.Get

func DownloadZipFile

func DownloadZipFile(getFn HTTPGetFunc, url string) (*zip.Reader, error)

DownloadZipFile downloads a zipfile from the given url and returns a zip.Reader The getFn matches the signature of http.Get

func GetFileFromTarGZ added in v1.1.20

func GetFileFromTarGZ(r *tar.Reader, fileName string) ([]byte, error)

func GetFileFromZip added in v1.1.20

func GetFileFromZip(r *zip.Reader, fileName string) ([]byte, error)

func GetTarGZFileFromDisk added in v1.1.20

func GetTarGZFileFromDisk(fileName string) (*tar.Reader, error)

GetTarGZFileFromDisk opens a zipfile from the filesystem and returns a zip.Reader

func GetZipFileFromDisk

func GetZipFileFromDisk(fileName string) (*zip.Reader, error)

GetZipFileFromDisk opens a zipfile from the filesystem and returns a zip.Reader

Types

type HTTPGetFunc added in v1.1.20

type HTTPGetFunc func(string) (*http.Response, error)

HTTPGetFunc is used to determine how remote URLs are downloaded. http.Get satisfies this type.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL