Documentation
¶
Overview ¶
Package update 提供 GitHub Release 更新检查功能。
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type CheckResult ¶
type CheckResult struct {
CurrentVersion string `json:"currentVersion"`
Latest ReleaseInfo `json:"latest"`
HasUpdate bool `json:"hasUpdate"`
}
CheckResult 是更新检查的结果。
func CheckLatest ¶
func CheckLatest(logger *slog.Logger) (*CheckResult, error)
CheckLatest 检查 GitHub 上是否有新版本。 返回 CheckResult(无论是否有更新),网络/解析错误时返回 error。 前端根据场景决定是否展示错误。
Click to show internal directories.
Click to hide internal directories.