Documentation ¶
Index ¶
- Variables
- func Download(ctx context.Context, dl *grab.Client, rel *github.RepositoryRelease, ...) (p string, err error)
- func FindLatest(ctx context.Context, gh *github.Client, preRelease bool) (*github.RepositoryRelease, error)
- func IsOutdated(ctx context.Context, gh *github.Client, v *semver.Version) (latest *semver.Version, outdated bool, err error)
- func IsPreRelease(v *semver.Version) bool
- func Unpack(src, dst string) error
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 ¶
IsPreRelease returns true if v is considered a pre-release version.
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.