downloader

package
v0.11.1-0...-8ab92b3 Latest Latest
Warning

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

Go to latest
Published: Jul 11, 2022 License: MIT Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Downloader

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

Downloader wraps the HTTP client to make get requests to a url and unzip to a specific directory.

func NewDownloader

func NewDownloader() *Downloader

NewDownloader creates a downloader with a default HTTP client which is used to download files from the net.

func (*Downloader) Get

func (d *Downloader) Get(url, dir string) error

Get takes a url and a directory where the contents should be unzipped into.

type Getter

type Getter interface {
	Get(url, dir string) error
}

Getter is an interface for getting the contents of a url and a directory to unzip the contents into a directory.

Jump to

Keyboard shortcuts

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