updating googleapis/gnostic to v0.1.0

per https://github.com/googleapis/gnostic/releases/tag/v0.1.0, the
v0.1.0 was made specifically for use by k8s, but we still seem to be
using a random SHA. Let's try to switch to a tagged version.
This commit is contained in:
Davanum Srinivas
2020-01-11 22:38:36 -05:00
parent 4a55a5557e
commit 420d5d10c4
32 changed files with 55 additions and 12 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 {