Skip to content

Repository files navigation

selfupdate

单文件程序自动升级库

安装

go get github.com/wsshow/selfupdate

例子

import (
"fmt""net/http""github.com/wsshow/selfupdate"
)
funcdoUpdate(urlstring) error {
resp, err:=http.Get(url)
iferr!=nil {
returnerr
}
deferresp.Body.Close()
err=selfupdate.Apply(resp.Body, selfupdate.Options{})
iferr!=nil {
// error handling
}
returnerr
}

参考

About

单文件程序自动升级库

Topics

Resources

Stars

1 star

Watchers

0 watching

Forks

Releases

Contributors

Languages