mirror of
https://github.com/yusing/godoxy.git
synced 2025-05-19 20:32:35 +02:00
fix: routes iter missing stream
This commit is contained in:
parent
cd291556fc
commit
a8ba42e360
1 changed files with 10 additions and 0 deletions
|
@ -15,6 +15,11 @@ func Iter(yield func(r Route) bool) {
|
|||
break
|
||||
}
|
||||
}
|
||||
for _, r := range Stream.Iter {
|
||||
if !yield(r) {
|
||||
break
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
func IterKV(yield func(alias string, r Route) bool) {
|
||||
|
@ -23,6 +28,11 @@ func IterKV(yield func(alias string, r Route) bool) {
|
|||
break
|
||||
}
|
||||
}
|
||||
for k, r := range Stream.Iter {
|
||||
if !yield(k, r) {
|
||||
break
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
func NumRoutes() int {
|
||||
|
|
Loading…
Add table
Reference in a new issue