mirror of
https://github.com/cubixle/tuu.git
synced 2026-04-30 14:08:44 +01:00
fixed a little bug which gave routes more than one /
This commit is contained in:
+1
-1
@@ -50,7 +50,7 @@ func (r *DefaultRouter) GetStaticRoutes() []*StaticRoute {
|
||||
|
||||
func (r *DefaultRouter) addRoute(m, p string, h Handler) {
|
||||
if r.prefix != "" {
|
||||
p = fmt.Sprintf("/%s/%s", strings.TrimPrefix(r.prefix, "/"), strings.TrimSuffix(p, "/"))
|
||||
p = fmt.Sprintf("/%s/%s", strings.Trim(r.prefix, "/"), strings.Trim(p, "/"))
|
||||
}
|
||||
|
||||
r.Routes = append(r.Routes, &Route{
|
||||
|
||||
Reference in New Issue
Block a user