option

package
v0.0.0-...-e97ee80 Latest Latest
Warning

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

Go to latest
Published: Aug 13, 2022 License: MIT Imports: 1 Imported by: 0

Documentation

Index

Constants

View Source
const (
	DefaultDataDir = "data"
)

Variables

This section is empty.

Functions

This section is empty.

Types

type DownloadOption

type DownloadOption func(o *DownloadOptions)

func FromURL

func FromURL(url string) DownloadOption

func WithDataDir

func WithDataDir(dir string) DownloadOption

func WithHTTPClient

func WithHTTPClient(client *http.Client) DownloadOption

type DownloadOptions

type DownloadOptions struct {
	URL     string
	DataDir string
	Client  *http.Client
}

func (*DownloadOptions) ApplyOptions

func (o *DownloadOptions) ApplyOptions(
	opts []DownloadOption,
	defs ...DownloadOption,
)

Jump to

Keyboard shortcuts

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