downloader

package module
v0.2.0 Latest Latest
Warning

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

Go to latest
Published: Jul 3, 2021 License: Unlicense Imports: 15 Imported by: 0

README

downloader Build Go Report Card GoDoc

Download tools released by goreleaser.

Check example in internal directory.

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func DownloadExecutable

func DownloadExecutable(opts DownloadExecutableOptions) (string, error)

Types

type DownloadExecutableOptions

type DownloadExecutableOptions struct {
	ExecutableName string
	Version        string

	SkipCache bool

	FileName string
	/*
		Example: "golangci-lint-v{version}-{os}-{arch}.{osArchiveType}"
		Supported template variables:
			- os            - runtime.GOOS
			- arch          - runtime.GOARCH
			- version       - Version
			- osArchiveType - `tar.gz` or `zip` - determined by runtime.GOOS
	*/
	FileNameTemplate string

	ReleaseBinaryUrl string
	/*
		Example: https://github.com/golangci/golangci-lint/releases/download/{version}/golangci-lint-{fileName}
		Supported template variables:
			- os            - runtime.GOOS
			- arch          - runtime.GOARCH
			- version       - Version
			- fileName      - FileName resolved from FileName or FileNameTemplate
			- osArchiveType - `tar.gz` or `zip` - determined by runtime.GOOS
	*/
	ReleaseBinaryUrlTemplate string
	SkipDecompression        bool

	SkipChecksumVerification bool
	ChecksumFilePath         string
	ChecksumFileContent      string
	FilenameToChecksum       map[string]string

	DestinationDirectory string

	BinaryPathInside string
	/*
		Example: golangci-lint-{version}-{os}-{arch}/{executableName}{executableExtension}
		Supported template variables:
			- os            - runtime.GOOS
			- arch          - runtime.GOARCH
			- version       - Version
			- fileName      - FileName resolved from FileName or FileNameTemplate
			- osArchiveType - `tar.gz` or `zip` - determined by runtime.GOOS
			- executableName - ExecutableName
			- executableExtension - ".exe" - for windows; "" - for others;
	*/
	BinaryPathInsideTemplate string

	InfoPrinter func(string)
	WarnPrinter func(string)
}

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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