claude code review changes
This commit is contained in:
6
route.go
6
route.go
@@ -33,7 +33,7 @@ func (s *RouteList) Get(index int) (string, error) {
|
||||
defer s.mu.RUnlock()
|
||||
|
||||
if index < 0 || index >= len(s.routes) {
|
||||
return "0", fmt.Errorf("index out of bounds")
|
||||
return "", fmt.Errorf("index out of bounds")
|
||||
}
|
||||
return s.routes[index], nil
|
||||
}
|
||||
@@ -47,5 +47,7 @@ func (s *RouteList) All() []string {
|
||||
s.mu.RLock()
|
||||
defer s.mu.RUnlock()
|
||||
|
||||
return s.routes
|
||||
out := make([]string, len(s.routes))
|
||||
copy(out, s.routes)
|
||||
return out
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user