diff --git a/lib/routing.go b/lib/routing.go index ddfe4a4..30afc9c 100644 --- a/lib/routing.go +++ b/lib/routing.go @@ -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()