forked from Silverfish/proton-bridge
tweak helpers
This commit is contained in:
@ -40,6 +40,7 @@ func createApp() *cli.App { // nolint[funlen]
|
||||
app.Flags = []cli.Flag{
|
||||
&cli.StringFlag{
|
||||
Name: "root",
|
||||
Aliases: []string{"C"},
|
||||
Usage: "The root directory from which to begin recursive hashing",
|
||||
Required: true,
|
||||
},
|
||||
|
||||
@ -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