commit
aab41ff6f4
|
@ -138,7 +138,7 @@ func filePasses(filename string, expectedBoilerplate []byte) (bool, error) {
|
|||
func filesToCheck(rootDir string, extensions map[string][]byte) ([]string, error) {
|
||||
var outFiles []string
|
||||
err := filepath.Walk(rootDir, func(path string, info os.FileInfo, err error) error {
|
||||
// remove current workdir from the beginig of the path in case it matches the skipped path
|
||||
// remove current workdir from the beginning of the path in case it matches the skipped path
|
||||
cwd, _ := os.Getwd()
|
||||
// replace "\" with "\\" for windows style path
|
||||
re := regexp.MustCompile(`\\`)
|
||||
|
|
|
@ -88,13 +88,13 @@ func handleDownloadOnly(cacheGroup, kicGroup *errgroup.Group, k8sVersion string)
|
|||
}
|
||||
|
||||
// CacheKubectlBinary caches the kubectl binary
|
||||
func CacheKubectlBinary(k8sVerison string) (string, error) {
|
||||
func CacheKubectlBinary(k8sVersion string) (string, error) {
|
||||
binary := "kubectl"
|
||||
if runtime.GOOS == "windows" {
|
||||
binary = "kubectl.exe"
|
||||
}
|
||||
|
||||
return download.Binary(binary, k8sVerison, runtime.GOOS, runtime.GOARCH)
|
||||
return download.Binary(binary, k8sVersion, runtime.GOOS, runtime.GOARCH)
|
||||
}
|
||||
|
||||
// doCacheBinaries caches Kubernetes binaries in the foreground
|
||||
|
|
|
@ -79,7 +79,7 @@ func printAsCloudEvent(log Log, data map[string]string) {
|
|||
|
||||
bs, err := event.MarshalJSON()
|
||||
if err != nil {
|
||||
glog.Errorf("error marashalling event: %v", err)
|
||||
glog.Errorf("error marshalling event: %v", err)
|
||||
return
|
||||
}
|
||||
fmt.Fprintln(outputFile, string(bs))
|
||||
|
@ -91,7 +91,7 @@ func printAndRecordCloudEvent(log Log, data map[string]string) {
|
|||
|
||||
bs, err := event.MarshalJSON()
|
||||
if err != nil {
|
||||
glog.Errorf("error marashalling event: %v", err)
|
||||
glog.Errorf("error marshalling event: %v", err)
|
||||
return
|
||||
}
|
||||
fmt.Fprintln(outputFile, string(bs))
|
||||
|
|
Loading…
Reference in New Issue