version

package
v0.2.0 Latest Latest
Warning

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

Go to latest
Published: Feb 24, 2026 License: GPL-3.0 Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func CompareVersion

func CompareVersion(v1, v2 string) int

CompareVersion 比较版本号 返回: 1 表示 v1 > v2, -1 表示 v1 < v2, 0 表示相等

Types

type VersionInfo

type VersionInfo struct {
	Version     string `json:"version"`
	ReleaseDate string `json:"release_date"`
	DownloadURL string `json:"download_url"`
	Changelog   string `json:"changelog"`
}

VersionInfo 版本信息

func GetLatestVersion

func GetLatestVersion() VersionInfo

GetLatestVersion 获取最新版本信息

func IsNeedUpdate

func IsNeedUpdate(currentVersion string) (bool, VersionInfo)

IsNeedUpdate 检查是否需要更新

Jump to

Keyboard shortcuts

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