mirror of
https://github.com/rclone/rclone.git
synced 2025-12-11 22:14:05 +01:00
plugins: restructure and add tests for pluginsctl/* calls
This commit is contained in:
committed by
Nick Craig-Wood
parent
cf68e61f40
commit
09b79679cd
@@ -27,9 +27,12 @@ func GetLatestReleaseURL(fetchURL string) (string, string, int, error) {
|
||||
}
|
||||
results := gitHubRequest{}
|
||||
if err := json.NewDecoder(resp.Body).Decode(&results); err != nil {
|
||||
return "", "", 0, errors.New("Could not decode results from http request")
|
||||
return "", "", 0, errors.New("could not decode results from http request")
|
||||
}
|
||||
if len(results.Assets) < 1 {
|
||||
return "", "", 0, errors.New("could not find an asset in the release. " +
|
||||
"check if asset was successfully added in github release assets")
|
||||
}
|
||||
|
||||
res := results.Assets[0].BrowserDownloadURL
|
||||
tag := results.TagName
|
||||
size := results.Assets[0].Size
|
||||
|
||||
Reference in New Issue
Block a user