1
0
mirror of https://github.com/kataras/iris.git synced 2025-12-18 10:27:06 +00:00
Former-commit-id: 9e5f0a08049b83605aa847b8f51fb856427354a6
This commit is contained in:
hiveminded
2017-09-07 16:20:31 +03:00
parent fcfc65a7bc
commit 8a9a498316
15 changed files with 184 additions and 25 deletions

View File

@@ -53,6 +53,13 @@ func resolveCaller(p pathInfo) callerFunc {
}
}
if p.ParamType == paramTypeBoolean {
return func(ctx context.Context, f interface{}) {
paramValue, _ := ctx.Params().GetBool(paramName)
f.(func(bool))(paramValue)
}
}
// else it's string or path, both of them are simple strings.
return func(ctx context.Context, f interface{}) {
paramValue := ctx.Params().Get(paramName)