Skip to content

Commit

Permalink
added PopFront() method to *RTHostList
Browse files Browse the repository at this point in the history
  • Loading branch information
distributed committed Jan 22, 2010
1 parent a714fd0 commit 0050d05
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions lib/routing.go
Original file line number Diff line number Diff line change
Expand Up @@ -103,6 +103,12 @@ func (l *RTHostList) Sort() {
sort.Sort(l)
}

func (l *RTHostList) PopFront() (h *RTHost) {
h = l.v.At(0).(*RTHost)
l.v.Cut(0, 0)
return
}

func (l *RTHostList) Data() []*RTHost {
v := l.v
vl := v.Len()
Expand Down

0 comments on commit 0050d05

Please sign in to comment.