Skip to content

Commit

Permalink
Fix go lint warning after add test
Browse files Browse the repository at this point in the history
Signed-off-by: Lei Jitang <leijitang@huawei.com>
  • Loading branch information
coolljt0725 committed Oct 11, 2016
1 parent f95665c commit 1b452a7
Showing 1 changed file with 3 additions and 4 deletions.
7 changes: 3 additions & 4 deletions image/layer_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -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)
},
}

Expand Down Expand Up @@ -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)
}
Expand Down

0 comments on commit 1b452a7

Please sign in to comment.