download

package
v1.0.375-0ebfedd Latest Latest
Warning

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

Go to latest
Published: Jun 28, 2021 License: MIT Imports: 9 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
}

func NewDownloader

func NewDownloader(timeout time.Duration, dir string) (*Downloader, error)

func (*Downloader) Download

func (d *Downloader) Download(ctx context.Context, rawURL string, perm os.FileMode) (string, error)

Download downloads the file from the rawURL, to a location rooted at the location specified when constructing the downloader nested to a file location based on the path part of the rawURL.

func (*Downloader) Remove

func (d *Downloader) Remove(rawURL string) error

Remove removes any file that the downloader had previously downloaded from the rawURL

Jump to

Keyboard shortcuts

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