Fixes K8sNetworkPlumbingWG package capitalization

Migrates package to use capitalized name, also cleans up dependencies.

Signed-off-by: Tim Rozet <trozet@redhat.com>
This commit is contained in:
Tim Rozet
2019-10-15 10:13:05 -04:00
committed by Doug Smith
parent e8baccff16
commit 3fbfe40e12
615 changed files with 56856 additions and 20781 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 {
@@ -104,7 +110,9 @@ func ReadInfoFromBytes(filename string, bytes []byte) (interface{}, error) {
if err != nil {
return nil, err
}
infoCache[filename] = info
if len(filename) > 0 {
infoCache[filename] = info
}
return info, nil
}