diff --git a/pkg/driverbuilder/builder/builders.go b/pkg/driverbuilder/builder/builders.go index 17cc436f..f4d96c92 100644 --- a/pkg/driverbuilder/builder/builders.go +++ b/pkg/driverbuilder/builder/builders.go @@ -87,10 +87,10 @@ func Script(b Builder, c Config, kr kernelrelease.KernelRelease) (string, error) // Otherwise, it is up to the builder to return an error if len(urls) > 0 { // Check (and filter) existing kernels before continuing - urls, err = getResolvingURLs(urls) + urls, err = GetResolvingURLs(urls) } } else { - urls, err = getResolvingURLs(c.KernelUrls) + urls, err = GetResolvingURLs(c.KernelUrls) } if err != nil { return "", err @@ -269,7 +269,7 @@ func resolveURLReference(u string) string { return base.ResolveReference(uu).String() } -func getResolvingURLs(urls []string) ([]string, error) { +func GetResolvingURLs(urls []string) ([]string, error) { var results []string for _, u := range urls { // in case url has some relative paths diff --git a/pkg/driverbuilder/builder/flatcar.go b/pkg/driverbuilder/builder/flatcar.go index 19a22a72..04e1a176 100644 --- a/pkg/driverbuilder/builder/flatcar.go +++ b/pkg/driverbuilder/builder/flatcar.go @@ -87,7 +87,7 @@ func fetchFlatcarKernelURLS(kernelVersion string) []string { func fetchFlatcarMetadata(kr kernelrelease.KernelRelease) (*flatcarReleaseInfo, error) { flatcarInfo := flatcarReleaseInfo{} flatcarVersion := kr.Fullversion - packageIndexUrl, err := getResolvingURLs(fetchFlatcarPackageListURL(kr.Architecture, flatcarVersion)) + packageIndexUrl, err := GetResolvingURLs(fetchFlatcarPackageListURL(kr.Architecture, flatcarVersion)) if err != nil { return nil, err } diff --git a/pkg/driverbuilder/builder/opensuse.go b/pkg/driverbuilder/builder/opensuse.go index 7e1a8cb4..daaae863 100644 --- a/pkg/driverbuilder/builder/opensuse.go +++ b/pkg/driverbuilder/builder/opensuse.go @@ -85,7 +85,7 @@ func (o *opensuse) URLs(kr kernelrelease.KernelRelease) ([]string, error) { possibleURLs := buildURLs(kr, kernelDefaultDevelPattern, kernelDevelNoArchPattern) // trim the list to only resolving URLs - urls, err := getResolvingURLs(possibleURLs) + urls, err := GetResolvingURLs(possibleURLs) if err != nil { return nil, err } diff --git a/pkg/driverbuilder/builder/ubuntu.go b/pkg/driverbuilder/builder/ubuntu.go index 03912079..acc9dfaa 100644 --- a/pkg/driverbuilder/builder/ubuntu.go +++ b/pkg/driverbuilder/builder/ubuntu.go @@ -96,7 +96,7 @@ func ubuntuHeadersURLFromRelease(kr kernelrelease.KernelRelease, kv string) ([]s return nil, err } // try resolving the URLs - urls, err := getResolvingURLs(possibleURLs) + urls, err := GetResolvingURLs(possibleURLs) // there should be 2 urls returned - the _all.deb package and the _{arch}.deb package if err == nil && len(urls) == ubuntuRequiredURLs { return urls, err