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 some panic information when a 'catch-all' wildcard conflict occurs. #182

Merged
merged 1 commit into from
Mar 24, 2017

Conversation

blinklv
Copy link
Contributor

@blinklv blinklv commented Feb 6, 2017

    tree := &node{}   
    tree.addRoute("/who/are/*you", fakeHandler("/who/are/*you"))
    tree.addRoute("/who/are/foo", fakeHandler("/who/are/foo")) // Wildcard Conflict panic
    tree.addRoute("/who/are/foo/bar", fakeHandler("/who/are/foo/bar")) // Wildcard Conflict panic

The second one and the third one will throw panic, but the information is not what I want (Maybe I don't completely understand it). It likes below:

'' in new path '/who/are/foo' conflicts with existing wildcard '/*you' in existing prefix '/*you'

'' in new path '/who/are/foo/bar' conflicts with existing wildcard '/*you' in existing prefix '/*you'

I think below information are better.

'/foo' in new path '/who/are/foo' conflicts with existing wildcard '/*you' in existing prefix '/who/are/*you'

'/foo/bar' in new path '/who/are/foo/bar' conflicts with existing wildcard '/*you' in existing prefix '/who/are/*you'

So I change it. :)

@julienschmidt julienschmidt merged commit 6f3f391 into julienschmidt:master Mar 24, 2017
@julienschmidt
Copy link
Owner

Thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants