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
You don't need to add your own url path function, the issue was just a wrapper around jet.Func.
Note that the /path/to/{id:int} -> ctx.Params().GetIntDefault("id", 0) works but you have to pass it as string argument in the {{urlpath("my-route", "42")}}
I also updated jet to the latest v3.0.0 which fixes some issues it had in the past (although, Iris had fixes about those by its side, those JetRanger "hacks" are removed from our code base as well).
Update to v12.1.6: go get -u github.com/kataras/iris/[email protected]
Describe the bug
[HTTP Server] http: panic serving [::1]:35074: interface conversion: interface {} is func(jet.Arguments) reflect.Value, not jet.Func
To Reproduce
Steps to reproduce the behavior:
iris: v12.1.5
make jet.View and use "urlpath" like
{{urlpath("pathname")}}
Example (https://github.com/kataras/iris/blob/master/_examples/routing/reverse/main.go)if i use something like
it works more or less with
{{ urlpath2("countriesDelete","1","2345") }}
but it don't work with uint/int etc currently.Expected behavior
return the correct urlpath for the route
additional:
maybe an example with routes with placeholders like
/path/to/:id
to set the named placeholdersalso a new v3 of jet is available.
The text was updated successfully, but these errors were encountered: