mirror of
https://github.com/rclone/rclone.git
synced 2025-08-16 16:41:34 +02:00
build: fix errors spotted by ineffassign linter
These were mostly caused by shadowing err and a good fraction of them will have caused errors not to be propagated properly.
This commit is contained in:
@ -149,6 +149,9 @@ func getAsset(project string, matchName *regexp.Regexp) (string, string) {
|
||||
log.Printf("Fetching asset info for %q from %q", project, url)
|
||||
user, pass := os.Getenv("GITHUB_USER"), os.Getenv("GITHUB_TOKEN")
|
||||
req, err := http.NewRequest("GET", url, nil)
|
||||
if err != nil {
|
||||
log.Fatalf("Failed to make http request %q: %v", url, err)
|
||||
}
|
||||
if user != "" && pass != "" {
|
||||
log.Printf("Fetching using GITHUB_USER and GITHUB_TOKEN")
|
||||
req.SetBasicAuth(user, pass)
|
||||
|
Reference in New Issue
Block a user