mirror of
https://github.com/ProtonMail/proton-bridge.git
synced 2026-02-04 00:08:33 +00:00
tweak helpers
This commit is contained in:
@ -166,12 +166,14 @@ func fetch(app, platform string) map[string]versionInfo {
|
||||
|
||||
res, err := resty.New().R().Get(url)
|
||||
if err != nil {
|
||||
println("fetch failed", err.Error())
|
||||
return make(map[string]versionInfo)
|
||||
}
|
||||
|
||||
var versionMap map[string]versionInfo
|
||||
|
||||
if err := json.Unmarshal(res.Body(), &versionMap); err != nil {
|
||||
println("unmarshal failed", err.Error())
|
||||
return make(map[string]versionInfo)
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user