Update go dependencies (#4322)
This commit is contained in:
parent
28cc3bb5e2
commit
a54ab3341e
507 changed files with 50566 additions and 40414 deletions
12
vendor/github.com/googleapis/gnostic/compiler/reader.go
generated
vendored
12
vendor/github.com/googleapis/gnostic/compiler/reader.go
generated
vendored
|
|
@ -15,7 +15,6 @@
|
|||
package compiler
|
||||
|
||||
import (
|
||||
"errors"
|
||||
"fmt"
|
||||
"gopkg.in/yaml.v2"
|
||||
"io/ioutil"
|
||||
|
|
@ -54,16 +53,11 @@ func FetchFile(fileurl string) ([]byte, error) {
|
|||
}
|
||||
return bytes, nil
|
||||
}
|
||||
if verboseReader {
|
||||
log.Printf("Fetching %s", fileurl)
|
||||
}
|
||||
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 {
|
||||
|
|
@ -110,9 +104,7 @@ func ReadInfoFromBytes(filename string, bytes []byte) (interface{}, error) {
|
|||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
if len(filename) > 0 {
|
||||
infoCache[filename] = info
|
||||
}
|
||||
infoCache[filename] = info
|
||||
return info, nil
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue