These are chat archives for gin-gonic/gin

19th
Aug 2017
johanhess1
@johanhess1
Aug 19 2017 14:21
Hello, everyone. I went to the IRC but it was empty, almost, so I was hoping I could ask my question here:
I have a question about gin url parameters, I desire a URL like this: http://www.mypage.com/wiki/pages/Namespace:WikPageName
Is there any way to escape the colon character?
But it gets better, the "namespace" should also be optional...
johanhess1
@johanhess1
Aug 19 2017 14:26
or is this better solved by splitting the string?
Mark Richman
@mrichman
Aug 19 2017 14:52
@johanhess1 escape? You mean to URL encode it?
johanhess1
@johanhess1
Aug 19 2017 15:00
@mrichman not exactly, I meant in the code when you specify the string to match against. eg: "wiki/pages/:namespace::page_slug
notice the two ":"'s
sort of a corny use case, I know