mirror of
https://github.com/yusing/godoxy.git
synced 2026-04-24 17:28:31 +02:00
fix: routes iter missing stream
This commit is contained in:
@@ -15,6 +15,11 @@ func Iter(yield func(r Route) bool) {
|
|||||||
break
|
break
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
for _, r := range Stream.Iter {
|
||||||
|
if !yield(r) {
|
||||||
|
break
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
func IterKV(yield func(alias string, r Route) bool) {
|
func IterKV(yield func(alias string, r Route) bool) {
|
||||||
@@ -23,6 +28,11 @@ func IterKV(yield func(alias string, r Route) bool) {
|
|||||||
break
|
break
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
for k, r := range Stream.Iter {
|
||||||
|
if !yield(k, r) {
|
||||||
|
break
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
func NumRoutes() int {
|
func NumRoutes() int {
|
||||||
|
|||||||
Reference in New Issue
Block a user