1
0

refactor: unexport getDebianKernel

This commit is contained in:
dump_stack() 2023-05-15 17:40:53 +00:00
parent 7c2957dafb
commit c13b595ab1
Signed by: dump_stack
GPG Key ID: BE44DA8C062D87DC
2 changed files with 3 additions and 3 deletions

View File

@ -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("")

View File

@ -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)
} }