1
0

Move kernel command to another file

This commit is contained in:
2018-11-17 20:24:09 +00:00
parent ce7fce49f5
commit cc3f536c62
2 changed files with 22 additions and 10 deletions

22
kernel.go Normal file
View File

@ -0,0 +1,22 @@
// Copyright 2018 Mikhail Klementev. All rights reserved.
// Use of this source code is governed by a AGPLv3 license
// (or later) that can be found in the LICENSE file.
package main
import (
"errors"
"fmt"
"github.com/jollheef/out-of-tree/config"
)
func kernelListHandler(kcfg config.KernelConfig) (err error) {
if len(kcfg.Kernels) == 0 {
return errors.New("No kernels found")
}
for _, k := range kcfg.Kernels {
fmt.Println(k.DistroType, k.DistroRelease, k.KernelRelease)
}
return
}