gupdate

package module
v0.0.0-...-cba195f Latest Latest
Warning

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

Go to latest
Published: Dec 20, 2024 License: MulanPSL-2.0 Imports: 8 Imported by: 0

README

var version = "1.0.0"

func main() { gUpdate.Run(version, "http://127.0.0.1/ces", true) for { fmt.Println(version) time.Sleep(time.Second * 2) } }

http://127.0.0.1/ces/version.json返回的是具体版本信息 { "Version":"1.0.1", "Name":"c2.exe" }

如果版本大于当前版本就更新 下载地址为 http://127.0.0.1/ces/c2.exe

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func CopyFile

func CopyFile(src, dst string) error

CopyFile 复制文件从 src 到 dst

func Run

func Run(Version, url string, Reload bool)

Types

type Config

type Config struct {
	URL string
}

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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