autodownload

package
v0.17.0 Latest Latest
Warning

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

Go to latest
Published: Apr 16, 2024 License: Apache-2.0 Imports: 15 Imported by: 0

Documentation

Overview

Package autodownload combines and replaces curl, tar and gunzip and sha256sum and allows downloading, verifying and extracting the archive (zip, tar, tar.gz) to a local directory without using external tools.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Download

func Download(url, dir string, checksum map[string]string, stripPathComponents int) error

Download downloads the provided URL and extracts it to the provided directory, retrying exponentionally until succeeded.

Types

type InvalidChecksumError added in v0.14.0

type InvalidChecksumError struct {
	// contains filtered or unexported fields
}

InvalidChecksumError is returned by Download when the checksum of the downloaded file does not match the expected checksum.

func (InvalidChecksumError) Error added in v0.14.0

func (e InvalidChecksumError) Error() string

Jump to

Keyboard shortcuts

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