Skip to content

Commit

Permalink
Minor fixups from golint
Browse files Browse the repository at this point in the history
  • Loading branch information
sysread committed Aug 6, 2018
1 parent fd311fa commit aea78e3
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions skewer.go
Original file line number Diff line number Diff line change
Expand Up @@ -235,17 +235,17 @@ func (heap *SkewHeap) Take() (SkewItem, error) {
heap.size--
heap.unlock()
return value, nil
} else {
heap.unlock()
return nil, errors.New("empty")
}

heap.unlock()
return nil, errors.New("empty")
}

// Returns the value highest priority from the heap without removing it.
func (heap *SkewHeap) Top() (SkewItem, error) {
if heap.Size() > 0 {
return heap.root.value, nil
} else {
return nil, errors.New("empty")
}

return nil, errors.New("empty")
}

0 comments on commit aea78e3

Please sign in to comment.