update

package
v0.0.0-...-129dccd Latest Latest
Warning

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

Go to latest
Published: Mar 15, 2024 License: MIT Imports: 13 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	// ErrReleaseNotFound that no releases could be found.
	ErrReleaseNotFound = errors.New("no releases")

	// ErrNoArchive is an error indicating that a release exist but there's no
	// archive available for the current platform.
	ErrNoArchive = fmt.Errorf("no release archive found for %s/%s", runtime.GOOS, runtime.GOARCH)
)

Functions

func Download

func Download(
	ctx context.Context,
	dl *grab.Client,
	rel *github.RepositoryRelease,
	progress func(uint64, uint64),
) (p string, err error)

Download a release archive for the current platform.

func FindLatest

func FindLatest(ctx context.Context, gh *github.Client, preRelease bool) (*github.RepositoryRelease, error)

FindLatest finds the latest Grit release.

func IsOutdated

func IsOutdated(
	ctx context.Context,
	gh *github.Client,
	v *semver.Version,
) (latest *semver.Version, outdated bool, err error)

IsOutdated returns true if v is not the latest available version.

func IsPreRelease

func IsPreRelease(v *semver.Version) bool

IsPreRelease returns true if v is considered a pre-release version.

func Unpack

func Unpack(src, dst string) error

Unpack an archive and return the location of the inner binary.

Types

This section is empty.

Jump to

Keyboard shortcuts

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