golang的私有化定制自动更新插件
zanbin168
2023-05-17 1a8f08a07d8b74bfde0fa94ad863f74118b7be35
_example/latest/latest.go
@@ -5,11 +5,10 @@
   "runtime"
   "github.com/apex/log"
   "github.com/kierdavis/ansi"
   "github.com/zan8in/go-update"
   "github.com/zan8in/go-update/progress"
   "github.com/zan8in/go-update/stores/github"
   update "github.com/zan8in/goupdate"
   "github.com/zan8in/goupdate/progress"
   "github.com/zan8in/goupdate/stores/github"
)
func init() {
@@ -17,16 +16,16 @@
}
func main() {
   ansi.HideCursor()
   defer ansi.ShowCursor()
   // ansi.HideCursor()
   // defer ansi.ShowCursor()
   // update polls(1) from tj/gh-polls on github
   m := &update.Manager{
      Command: "polls",
      Command: "afrog.exe",
      Store: &github.Store{
         Owner:   "tj",
         Repo:    "gh-polls",
         Version: "0.0.3",
         Owner:   "zan8in",
         Repo:    "afrog",
         Version: "2.3.1",
      },
   }
@@ -46,7 +45,7 @@
   latest := releases[0]
   // find the tarball for this system
   a := latest.FindTarball(runtime.GOOS, runtime.GOARCH)
   a := latest.FindZip(runtime.GOOS, runtime.GOARCH)
   if a == nil {
      log.Info("no binary for your system")
      return