Skip to content

Commit

Permalink
Simplify if branch
Browse files Browse the repository at this point in the history
Signed-off-by: Simon Pasquier <[email protected]>
  • Loading branch information
simonpasquier committed Sep 13, 2019
1 parent f1ef765 commit 7a02ae8
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions pkg/changelog/changelog.go
Original file line number Diff line number Diff line change
Expand Up @@ -87,11 +87,10 @@ func (k Kinds) String() string {

// Before returns whether the receiver should sort before the other.
func (k Kinds) Before(other Kinds) bool {
if len(k) == 0 {
return len(other) == 0
}
if len(other) == 0 {
return true
} else if len(k) == 0 {
return false
}

n := len(k)
Expand Down

0 comments on commit 7a02ae8

Please sign in to comment.