From 1b452a78d497697ec4a46eb4eca1aecd3e7c0c12 Mon Sep 17 00:00:00 2001 From: Lei Jitang Date: Tue, 11 Oct 2016 04:39:31 -0400 Subject: [PATCH] Fix go lint warning after add test Signed-off-by: Lei Jitang --- image/layer_test.go | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/image/layer_test.go b/image/layer_test.go index 61de073..134adc3 100644 --- a/image/layer_test.go +++ b/image/layer_test.go @@ -92,8 +92,7 @@ func TestCreateFilesystemChangeset(t *testing.T) { } modifiedfiles := map[string]func(string) error{ "bin/app": func(path string) error { - err := ioutil.WriteFile(path, []byte(fmt.Sprintf("Hello world")), 0755) - return err + return ioutil.WriteFile(path, []byte(fmt.Sprintf("Hello world")), 0755) }, } @@ -175,13 +174,13 @@ func createFilesystem(path string, files map[string]bool, modify map[string]func } func verify(m1 map[string]bool, m2 map[string]bool) error { - for f, _ := range m1 { + for f := range m1 { if _, ok := m2[f]; !ok { return fmt.Errorf("expected file %v not exist", f) } } - for f, _ := range m2 { + for f_ := range m2 { if _, ok := m1[f]; !ok { return fmt.Errorf("%v is not an expected file", f) }