github

package
v1.7.0 Latest Latest
Warning

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

Go to latest
Published: Jul 7, 2024 License: MIT Imports: 14 Imported by: ? 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

This section is empty.

Types

type Asset

type Asset struct {
	Name               string `json:"name"`
	ContentType        string `json:"content_type"`
	BrowserDownloadURL string `json:"browser_download_url"`
}

Asset 静态资源

func (Asset) IsCompressedFile

func (a Asset) IsCompressedFile() bool

IsCompressedFile 返回是否是压缩文件的布尔值

type Release

type Release struct {
	TagName string  `json:"tag_name"`
	Assets  []Asset `json:"assets"`
}

Release 版本

type ReleaseUpdater

type ReleaseUpdater struct {
}

ReleaseUpdater 版本更新器

func NewReleaseUpdater

func NewReleaseUpdater() *ReleaseUpdater

NewReleaseUpdater 返回版本更新器实例

func (ReleaseUpdater) Apply

func (up ReleaseUpdater) Apply(rel *Release,
	findAsset func([]Asset) (idx int),
	findChecksum func([]Asset) (algo checksum.Algorithm, expectedChecksum string, err error),
) error

Apply 更新指定版本

func (ReleaseUpdater) CheckForUpdates

func (up ReleaseUpdater) CheckForUpdates(current *semver.Version, owner, repo string) (rel *Release, yes bool, err error)

CheckForUpdates 检查是否有更新

Jump to

Keyboard shortcuts

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