I want complete control. I want to be able to do some odd things to handle edge cases and I want all the logic in normal if else golang statements.
if second == "routing" && third == "" && c.Method == "GET" {
handleFrameRouting(c)
return
}
The var
second
and the var
third
are the 2nd the 3rd tokens from the url path like:
/first/second/third
A common case is something like
https://www.reddit.com/r/golang/f9a0919a-346e-4bc4-b6b7-c94cfa049cc9
where first is "r" and second is "golang" and third is that guid.
if second == "golang" && third != "" && c.Method == "GET" {