You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I find this regexp doesn't work and i find code below:
core/router/path.go
func cleanPath(s string) string {
if s == "" || s == "." {
return "/"
}
// remove suffix "/"
if lidx := len(s) - 1; s[lidx] == '/' {
s = s[:lidx]
}
// prefix with "/"
s = prefix(s, "/")
// remove the os specific dir sep
s = strings.Replace(s, "\\", "/", -1)
// use std path to clean the path
s = path.Clean(s)
return s
}
s = strings.Replace(s, "\\", "/", -1) it will replace the path to /total/{year:string regexp(/d{4})} and so the regexp doesn't work, is this a bug?
The text was updated successfully, but these errors were encountered:
Although I fixed it @yale8848 , you can use your code above but I recommend using macros, so you can re-use your regex everywhere in your app's routes. Thanks for the report and your interest into Iris, as always :)
I find this regexp doesn't work and i find code below:
core/router/path.go
s = strings.Replace(s, "\\", "/", -1)
it will replace the path to/total/{year:string regexp(/d{4})}
and so the regexp doesn't work, is this a bug?The text was updated successfully, but these errors were encountered: