A Go library for downloading files and directories from various sources using a single URL string.
go-getter is a Go library that provides a unified interface for downloading files and directories from multiple sources like Git, HTTP, S3, and local files using URL strings. It solves the problem of handling diverse download protocols by abstracting them behind a simple API, automatically detecting and transforming shorthand inputs into valid URLs.
Go developers building tools that require flexible resource fetching, such as infrastructure-as-code platforms, package managers, or deployment systems that download modules, binaries, or assets.
Developers choose go-getter for its protocol-agnostic design, built-in security features, and seamless integration with HashiCorp ecosystems like Terraform and Nomad, reducing the need to implement custom download logic for each source.
Package for downloading things from a string URL using a variety of protocols.
Open-Awesome is built by the community, for the community. Submit a project, suggest an awesome list, or help improve the catalog on GitHub.
Abstracts multiple download sources (Git, HTTP, S3, etc.) behind a single URL-based API, as documented in the 'Supported Protocols and Detectors' section, eliminating the need for protocol-specific implementations.
Automatically transforms shorthand inputs like 'github.com/user/repo' into proper Git URLs using built-in detectors, simplifying user input and reducing errors.
Includes configurable options to mitigate SSRF, path traversal, and DoS risks, such as disable symlinks and timeouts, detailed in the 'Security Options' section.
Supports unarchiving common formats (tar.gz, zip, etc.) automatically based on file extensions or the archive query parameter, reducing manual extraction steps.
Allows automatic integrity checks with MD5, SHA, or checksum files via query parameters, ensuring downloaded files are valid and skipping duplicates.
Despite mitigations, handling user-supplied URLs is inherently risky, requiring additional sanitization to prevent sensitive data leakage, as cautioned in the 'Security' section.
Combining features like checksums, subdirectories, and protocol options leads to long, complex URLs that are hard to read and maintain, especially with multiple query parameters.
While new protocols can be added via the Getter interface, the built-in set is fixed, and integrating custom protocols requires non-trivial implementation effort.
Features like automatic unarchiving and checksum verification add processing time and memory usage, which can be inefficient for simple, direct downloads.