Permalink
Browse files

fix cond for empty slice

  • Loading branch information...
1 parent 0211c7c commit db7b0f84ef10a5830ca076e1631cad450b063579 @haya14busa haya14busa committed Sep 12, 2016
Showing with 2 additions and 2 deletions.
  1. +2 −2 gocover.go
View
@@ -38,7 +38,7 @@ func mergeProfs(pfss [][]*cover.Profile) []*cover.Profile {
break
}
}
- if len(pfss) < 1 {
+ if len(pfss) == 0 {
return nil
} else if len(pfss) == 1 {
return pfss[0]
@@ -47,7 +47,7 @@ func mergeProfs(pfss [][]*cover.Profile) []*cover.Profile {
ret := make([]*cover.Profile, 0, len(head))
for i, profile := range head {
for _, ps := range rest {
- if len(ps) < 1 {
+ if len(ps) == 0 {
// no test files
continue
} else if len(ps) < i+1 {

0 comments on commit db7b0f8

Please sign in to comment.