1
0
mirror of https://github.com/kubernetes-sigs/descheduler.git synced 2026-01-26 13:29:11 +01:00

Update to k8s 1.18.2 dependencies

This commit is contained in:
Mike Dame
2020-05-12 14:07:31 -04:00
parent c01cfcf3b6
commit 741b35edf5
697 changed files with 24602 additions and 11346 deletions

View File

@@ -15,6 +15,7 @@
package compiler
import (
"errors"
"fmt"
"gopkg.in/yaml.v2"
"io/ioutil"
@@ -53,11 +54,16 @@ func FetchFile(fileurl string) ([]byte, error) {
}
return bytes, nil
}
log.Printf("Fetching %s", fileurl)
if verboseReader {
log.Printf("Fetching %s", fileurl)
}
response, err := http.Get(fileurl)
if err != nil {
return nil, err
}
if response.StatusCode != 200 {
return nil, errors.New(fmt.Sprintf("Error downloading %s: %s", fileurl, response.Status))
}
defer response.Body.Close()
bytes, err = ioutil.ReadAll(response.Body)
if err == nil {