(path string)
| 263 | } |
| 264 | |
| 265 | func normalizeBasePath(path string) string { |
| 266 | trimmed := strings.TrimSpace(path) |
| 267 | if trimmed == "" || trimmed == "/" { |
| 268 | return "" |
| 269 | } |
| 270 | if !strings.HasPrefix(trimmed, "/") { |
| 271 | trimmed = "/" + trimmed |
| 272 | } |
| 273 | return strings.TrimSuffix(trimmed, "/") |
| 274 | } |
| 275 | |
| 276 | func joinRoute(basePath, pattern string) string { |
| 277 | if basePath == "" { |
no outgoing calls
no test coverage detected