diff --git a/host/detect.go b/host/detect.go index 659353d..bdfb469 100644 --- a/host/detect.go +++ b/host/detect.go @@ -22,7 +22,7 @@ func execOutput(name string, arg ...string) (output string, err error) { if out, err = exec.Command(name, arg...).Output(); err != nil { return } - output = string(out) + output = strings.TrimSpace(string(out)) return } diff --git a/host/detect_test.go b/host/detect_test.go index aa33dca..de8a6cd 100644 --- a/host/detect_test.go +++ b/host/detect_test.go @@ -7,14 +7,6 @@ func TestKernelVersionParse(t *testing.T) { versionStr string major, minor, patch int }{ - { - "3.8", - 3, 8, 0, - }, - { - "3.7", - 3, 7, 0, - }, { "3.8.2", 3, 8, 2,