mirror of
https://github.com/yusing/godoxy.git
synced 2026-01-11 22:30:47 +01:00
fix: routes iter missing stream
This commit is contained in:
@@ -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 {
|
||||
|
||||
Reference in New Issue
Block a user