检查版本更新时增加当前版本参数

This commit is contained in:
GoEdgeLab
2023-03-12 21:24:08 +08:00
parent 034e8da212
commit e7dd05e433
4 changed files with 4 additions and 1 deletions
+1
View File
@@ -87,6 +87,7 @@ func (this *CheckUpdatesTask) Loop() error {
var apiURL = teaconst.UpdatesURL
apiURL = strings.ReplaceAll(apiURL, "${os}", runtime.GOOS)
apiURL = strings.ReplaceAll(apiURL, "${arch}", runtime.GOARCH)
apiURL = strings.ReplaceAll(apiURL, "${version}", teaconst.Version)
resp, err := http.Get(apiURL)
if err != nil {
return errors.New("read api failed: " + err.Error())