update

package
v0.0.0-...-758a821 Latest Latest
Warning

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

Go to latest
Published: Dec 3, 2021 License: MIT Imports: 14 Imported by: 0

Documentation

Index

Constants

View Source
const (
	WoReleaseURI       = "https://api.github.com/repos/ali-furkan/wo/releases/latest"
	ErrReleaseNotFound = "release not found"
	ErrInternetConn    = "get release failure: please check your internet connection"
)

Variables

This section is empty.

Functions

func Update

func Update() error

Types

type ReleaseInfo

type ReleaseInfo struct {
	Version     string `json:"tag_name"`
	URL         string `json:"url"`
	InfoURL     string `json:"html_url"`
	PublishedAt string `json:"published_at"`
}

func CheckForUpdate

func CheckForUpdate() (*ReleaseInfo, error)

type UpdateState

type UpdateState struct {
	LastCheckedAt time.Time   `yaml:"last_checked_at"`
	LatestRelease ReleaseInfo `yaml:"latest_release"`
}

Jump to

Keyboard shortcuts

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