()
| 159 | } |
| 160 | |
| 161 | func exampleRoutes() Routes { |
| 162 | return Routes{ |
| 163 | RouteInfo{ |
| 164 | Method: http.MethodGet, |
| 165 | Path: "/users", |
| 166 | Parameters: nil, |
| 167 | Name: "GET:/users", |
| 168 | }, |
| 169 | RouteInfo{ |
| 170 | Method: http.MethodGet, |
| 171 | Path: "/users/:id", |
| 172 | Parameters: []string{"id"}, |
| 173 | Name: "GET:/users/:id", |
| 174 | }, |
| 175 | RouteInfo{ |
| 176 | Method: http.MethodPost, |
| 177 | Path: "/users/:id", |
| 178 | Parameters: []string{"id"}, |
| 179 | Name: "POST:/users/:id", |
| 180 | }, |
| 181 | RouteInfo{ |
| 182 | Method: http.MethodDelete, |
| 183 | Path: "/groups", |
| 184 | Parameters: nil, |
| 185 | Name: "non_unique_name", |
| 186 | }, |
| 187 | RouteInfo{ |
| 188 | Method: http.MethodPost, |
| 189 | Path: "/groups", |
| 190 | Parameters: nil, |
| 191 | Name: "non_unique_name", |
| 192 | }, |
| 193 | } |
| 194 | } |
| 195 | |
| 196 | func TestRoutes_Clone(t *testing.T) { |
| 197 | org := exampleRoutes() |
no outgoing calls
no test coverage detected
searching dependent graphs…