mirror of
https://github.com/netbirdio/netbird.git
synced 2025-04-11 21:18:57 +02:00
Fix capacity of slice (#2148)
The append keep the initial len and append to end of the original slice
This commit is contained in:
parent
85d17cbc89
commit
919c1cb3d4
@ -306,7 +306,7 @@ func (m *DefaultManager) classifyRoutes(newRoutes []*route.Route) (map[route.ID]
|
||||
|
||||
func (m *DefaultManager) clientRoutes(initialRoutes []*route.Route) []*route.Route {
|
||||
_, crMap := m.classifyRoutes(initialRoutes)
|
||||
rs := make([]*route.Route, len(crMap))
|
||||
rs := make([]*route.Route, 0, len(crMap))
|
||||
for _, routes := range crMap {
|
||||
rs = append(rs, routes...)
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user