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

Example of /} in path template #232

Closed
tamalsaha opened this issue Oct 8, 2016 · 1 comment
Closed

Example of /} in path template #232

tamalsaha opened this issue Oct 8, 2016 · 1 comment

Comments

@tamalsaha
Copy link
Collaborator

tamalsaha commented Oct 8, 2016

Hi,
I was studying the code for this repo and noticed the following piece of code in:
https://github.com/grpc-ecosystem/grpc-gateway/blob/master/protoc-gen-grpc-gateway/httprule/parse.go#L61

        case nested:
            idx = strings.IndexAny(path, "/}")
        }

I am curious what is an example of a path template that can have this substring. Is this supposed to be }/ ?

@tamalsaha
Copy link
Collaborator Author

It seems IndexAny matches any char from the second string. The order does not matter.

@tamalsaha tamalsaha mentioned this issue Mar 30, 2017
1 task
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant