core

package
v0.0.15 Latest Latest
Warning

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

Go to latest
Published: Dec 25, 2022 License: GPL-3.0 Imports: 13 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	// 用于检测更新
	GitVersion = ""

	TempDir = filepath.Join(os.TempDir(), "starbox")
)
View Source
var (
	FUpdateMode = flag.Bool("updateMode", false, "")
)

Functions

func CheckAndCrateOsTemp added in v0.0.14

func CheckAndCrateOsTemp() error

func CheckReleaseWithGitee added in v0.0.9

func CheckReleaseWithGitee(giteeRepoAddress string, mirrors []string) (isUpdateRequired bool, release *gitee.Release, err error)

func ContinueSelfUpdate

func ContinueSelfUpdate() error

在这里继续完成升级

func Destroy added in v0.0.14

func Destroy()

func SelfUpdateWithGitee

func SelfUpdateWithGitee(asset *gitee.ReleaseAssets, wdPath, tempDirName, updateDelay string, cb gitee.DownloadCB) (bool, error)

仅适用于单个可执行文件的更新 并且下载完后应当及时退出(在updateDelay期限内)

SelfUpdateWithGitee(wdPath, "name*", assets, "3s") 需要接收者接受参数:-updateMode -updateTarget -updateDelay 3s

func WriteEmbedEntrysTo added in v0.0.9

func WriteEmbedEntrysTo(embedDir *embed.FS, f fs.DirEntry, rootPath string, parentNode string) error

Types

This section is empty.

Jump to

Keyboard shortcuts

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