t.routeMap.Range(func(key, value any) bool {
var exist bool
- for k := 0; k < len(t.Routes) && exist == false; k++ {
+ for k := 0; k < len(t.Routes) && !exist; k++ {
for _, routePath := range t.Routes[k].Path {
if key.(string) == routePath {
exist = true
})
for i := 0; i < len(t.Routes); i++ {
- if _, ok := t.routeMap.Load(t.Routes[i].Path); !ok {
- for _, routePath := range t.Routes[i].Path {
+ for _, routePath := range t.Routes[i].Path {
+ if _, ok := t.routeMap.Load(routePath); !ok {
add(routePath, &t.Routes[i], logger)
}
}