update

package
v0.0.1 Latest Latest
Warning

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

Go to latest
Published: Sep 30, 2021 License: MIT Imports: 19 Imported by: 0 modules, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func DoUpdate

func DoUpdate(version string) (err error)

func DownloadLatestStableRelease

func DownloadLatestStableRelease(ctx context.Context, target, currentVersion string) (version string, err error)

DownloadLatestStableRelease downloads the latest stable released version of restic and saves it to target. It returns the version string for the newest version. The function printf is used to print progress information.

Types

type Asset

type Asset struct {
	ID   int    `json:"id"`
	Name string `json:"name"`
	URL  string `json:"url"`
}

Asset is a file uploaded and attached to a release.

type Release

type Release struct {
	Name        string    `json:"name"`
	TagName     string    `json:"tag_name"`
	Draft       bool      `json:"draft"`
	PreRelease  bool      `json:"prerelease"`
	PublishedAt time.Time `json:"published_at"`
	Assets      []Asset   `json:"assets"`

	Version string `json:"-"` // set manually in the code
}

Release collects data about a single release on GitHub.

func GitHubLatestRelease

func GitHubLatestRelease(ctx context.Context, owner, repo string) (Release, error)

GitHubLatestRelease uses the GitHub API to get information about the latest release of a repository.

func (Release) String

func (r Release) String() string

Jump to

Keyboard shortcuts

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