dl

package
v0.0.0-...-2272bf2 Latest Latest
Warning

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

Go to latest
Published: Sep 30, 2017 License: MIT Imports: 9 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func DownloadAsset

func DownloadAsset(asset *Asset) error

DownloadAsset downloads provided asset.

func SelectLatestRelease

func SelectLatestRelease(skipPrerelease bool, releases []*github.RepositoryRelease) (*github.RepositoryRelease, error)

SelectLatestRelease finds the latest release according to semver sort

func SelectNonPrerelease

func SelectNonPrerelease(releases []*github.RepositoryRelease) ([]*github.RepositoryRelease, error)

SelectNonPrerelease finds releases which are not prerelease.

func SelectReleases

func SelectReleases(constraint string, skipPrerelease bool, releases []*github.RepositoryRelease) ([]*github.RepositoryRelease, error)

SelectReleases finds releases matching the given semver constraint

Types

type Asset

type Asset struct {
	SourceURL  string
	TargetFile string
	Name       string
	Arch       string
	System     string
	Ext        string
	Version    string
}

Asset represents an asset existing on the remote.

func SelectAssets

func SelectAssets(ctx context.Context, client *github.Client, owner string, repo string, glob string, out string, releases []*github.RepositoryRelease) ([]*Asset, error)

SelectAssets finds assets matching glob within given releases,

Jump to

Keyboard shortcuts

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