Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix(tree): reassign fullpath when register new node which the same current node #2366

Merged
merged 4 commits into from May 11, 2020
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
3 changes: 3 additions & 0 deletions routes_test.go
Expand Up @@ -593,6 +593,9 @@ func TestRouteContextHoldsFullPath(t *testing.T) {
"/simple-two/one-two",
"/project/:name/build/*params",
"/project/:name/bui",
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

put these changes back and add a new route as above.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Done @appleboy. I added new route.

"/user/:id/status",
"/user/:id",
"/user/:id/profile",
}

for _, route := range routes {
Expand Down
1 change: 1 addition & 0 deletions tree.go
Expand Up @@ -240,6 +240,7 @@ walk:
panic("handlers are already registered for path '" + fullPath + "'")
}
n.handlers = handlers
n.fullPath = fullPath
return
}
}
Expand Down