This commit is contained in:
Marc Campbell
2019-10-29 19:56:29 +00:00
parent 14ace5294f
commit 8a1bb8a422
4 changed files with 7 additions and 7 deletions

View File

@@ -66,10 +66,10 @@ func runAnalyzers(v *viper.Viper, bundlePath string) error {
}
func isURL(str string) bool {
_, err := url.ParseRequestURI(str)
parsed, err := url.ParseRequestURI(str)
if err != nil {
return false
}
return true
return parsed.Scheme != ""
}

View File

@@ -17,12 +17,12 @@ func homeDir() string {
}
func isURL(str string) bool {
_, err := url.ParseRequestURI(str)
parsed, err := url.ParseRequestURI(str)
if err != nil {
return false
}
return true
return parsed.Scheme != ""
}
func createTroubleshootK8sClient(configFlags *genericclioptions.ConfigFlags) (*troubleshootclientv1beta1.TroubleshootV1beta1Client, error) {

View File

@@ -18,12 +18,12 @@ func homeDir() string {
}
func isURL(str string) bool {
_, err := url.ParseRequestURI(str)
parsed, err := url.ParseRequestURI(str)
if err != nil {
return false
}
return true
return parsed.Scheme != ""
}
func createTroubleshootK8sClient(configFlags *genericclioptions.ConfigFlags) (*troubleshootclientv1beta1.TroubleshootV1beta1Client, error) {

View File

@@ -18,7 +18,7 @@ import (
func Analyze(bundleURL string, analyzers string, outputFormat string, compatibility string) *C.char {
logger.SetQuiet(true)
result, err := analyzer.DownloadAndAnalyze(context.Background(), bundleURL, analyzers)
result, err := analyzer.DownloadAndAnalyze(bundleURL, analyzers)
if err != nil {
fmt.Printf("error downloading and analyzing: %s\n", err.Error())
return C.CString("")