refactor: unexport getDebianKernel
This commit is contained in:
parent
7c2957dafb
commit
c13b595ab1
@ -68,7 +68,7 @@ var (
|
|||||||
ErrNoImagePackage = errors.New("no image package found")
|
ErrNoImagePackage = errors.New("no image package found")
|
||||||
)
|
)
|
||||||
|
|
||||||
func GetDebianKernel(version string) (dk DebianKernel, err error) {
|
func getDebianKernel(version string) (dk DebianKernel, err error) {
|
||||||
dk.Version.Package = version
|
dk.Version.Package = version
|
||||||
|
|
||||||
regex := `^(linux-(image|headers)-[a-z+~0-9\.\-]*-(common|amd64|amd64-unsigned)|linux-kbuild-.*)$`
|
regex := `^(linux-(image|headers)-[a-z+~0-9\.\-]*-(common|amd64|amd64-unsigned)|linux-kbuild-.*)$`
|
||||||
@ -289,7 +289,7 @@ func GetKernels() (kernels []DebianKernel, err error) {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
dk, err = GetDebianKernel(version)
|
dk, err = getDebianKernel(version)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
if err == ErrNoBinaryPackages {
|
if err == ErrNoBinaryPackages {
|
||||||
slog.Warn().Err(err).Msg("")
|
slog.Warn().Err(err).Msg("")
|
||||||
|
@ -7,7 +7,7 @@ import (
|
|||||||
)
|
)
|
||||||
|
|
||||||
func TestGetDebianKernel(t *testing.T) {
|
func TestGetDebianKernel(t *testing.T) {
|
||||||
dk, err := GetDebianKernel("4.17.14-1")
|
dk, err := getDebianKernel("4.17.14-1")
|
||||||
if err != nil {
|
if err != nil {
|
||||||
t.Fatal(err)
|
t.Fatal(err)
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user