Categorygithub.com/yujunz/go-getter
modulepackage
1.4.1-lite
Repository: https://github.com/yujunz/go-getter.git
Documentation: pkg.go.dev

# README

go-getter

Lite version with fewer dependency.

S3 and GCS is not supported.

# Packages

No description provided by the author

# Functions

Copy is a io.Copy cancellable by context.
Detect turns a source string into another source string if it is detected to be of a known pattern.
Get downloads the directory specified by src into the folder specified by dst.
GetAny downloads a URL into the given destination.
GetFile downloads the file specified by src into the path specified by dst.
SourceDirSubdir takes a source URL and returns a tuple of the URL without the subdir and the subdir.
SubdirGlob returns the actual subdir with globbing processed.
TestDecompressor is a helper function for testing generic decompressors.
WithContext allows to pass a context to operation in order to be able to cancel a download in progress.
WithProgress allows for a user to track the progress of a download.

# Constants

ClientModeAny downloads anything it can.
ClientModeDir downloads a directory.
ClientModeFile downloads a single file.
No description provided by the author

# Variables

Decompressors is the mapping of extension to the Decompressor implementation that will decompress that extension/type.
Detectors is the list of detectors that are tried on an invalid URL.
Getters is the mapping of scheme to the Getter implementation that will be used to get a dependency.

# Structs

BitBucketDetector implements Detector to detect BitBucket URLs and turn them into URLs that the Git or Hg Getter can understand.
Bzip2Decompressor is an implementation of Decompressor that can decompress bz2 files.
A ChecksumError is returned when a checksum differs.
Client is a client for downloading things.
FileChecksum helps verifying the checksum for a file.
FileDetector implements Detector to detect file paths.
FileGetter is a Getter implementation that will download a module from a file scheme.
FolderStorage is an implementation of the Storage interface that manages modules on the disk.
GitDetector implements Detector to detect Git SSH URLs such as [email protected]:dir1/dir2 and converts them to proper URLs.
GitGetter is a Getter implementation that will download a module from a git repository.
GitHubDetector implements Detector to detect GitHub URLs and turn them into URLs that the Git Getter can understand.
GzipDecompressor is an implementation of Decompressor that can decompress gzip files.
HgGetter is a Getter implementation that will download a module from a Mercurial repository.
HttpGetter is a Getter implementation that will download from an HTTP endpoint.
MockGetter is an implementation of Getter that can be used for tests.
TarBzip2Decompressor is an implementation of Decompressor that can decompress tar.bz2 files.
TarGzipDecompressor is an implementation of Decompressor that can decompress tar.gzip files.
TarXzDecompressor is an implementation of Decompressor that can decompress tar.xz files.
TestDecompressCase is a single test case for testing decompressors.
XzDecompressor is an implementation of Decompressor that can decompress xz files.
ZipDecompressor is an implementation of Decompressor that can decompress zip files.

# Interfaces

Decompressor defines the interface that must be implemented to add support for decompressing a type.
Detector defines the interface that an invalid URL or a URL with a blank scheme is passed through in order to determine if its shorthand for something else well-known.
Getter defines the interface that schemes must implement to download things.
ProgressTracker allows to track the progress of downloads.
Storage is an interface that knows how to lookup downloaded directories as well as download and update directories from their sources into the proper location.

# Type aliases

ClientMode is the mode that the client operates in.
A ClientOption allows to configure a client.