Clone creates copy of Routes
()
| 106 | |
| 107 | // Clone creates copy of Routes |
| 108 | func (r Routes) Clone() Routes { |
| 109 | result := make(Routes, len(r)) |
| 110 | for i, route := range r { |
| 111 | result[i] = route.Clone() |
| 112 | } |
| 113 | return result |
| 114 | } |
| 115 | |
| 116 | // Reverse reverses route to URL string by replacing path parameters with given params values. |
| 117 | func (r Routes) Reverse(routeName string, pathValues ...any) (string, error) { |
no outgoing calls