download

package
v1.0.6752-d6e255b Latest Latest
Warning

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

Go to latest
Published: Jun 5, 2023 License: MIT Imports: 10 Imported by: 0

Documentation

Overview

Package download helps download releases of binaries.

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