From 1ebbe540a5be0a8b03528ab3890f2567626fd8d7 Mon Sep 17 00:00:00 2001 From: Karan Misra Date: Sun, 2 Mar 2014 19:39:04 +0530 Subject: [PATCH] remove trailing white space --- host/detect.go | 2 +- host/detect_test.go | 8 -------- 2 files changed, 1 insertion(+), 9 deletions(-) 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,