mirror of
https://github.com/kataras/iris.git
synced 2026-01-24 12:25:57 +00:00
_future
Former-commit-id: 06ad874613c270383be5a7355cbb23a2dcf7a903
This commit is contained in:
@@ -47,6 +47,8 @@ func link(path string, mac _macros) iris.HandlerFunc {
|
||||
if err != nil {
|
||||
panic(err)
|
||||
}
|
||||
|
||||
// println(tmpl.Params[0].Param.FailStatusCode)
|
||||
// link the path, based on its template with a macro
|
||||
// and return a new compiled macro or a list of iris handlers
|
||||
// in order to be prepended on the original route or make a different function for that?
|
||||
@@ -334,8 +336,8 @@ func TestMacros(t *testing.T) {
|
||||
// when string macro is used:
|
||||
addMacroFunc("string", "contains", macroFuncFrom(func(text string) _macrofn {
|
||||
return func(paramValue string) bool {
|
||||
println("from string:contains instead of any:string")
|
||||
println("'" + text + "' vs '" + paramValue + "'")
|
||||
// println("from string:contains instead of any:string")
|
||||
// println("'" + text + "' vs '" + paramValue + "'")
|
||||
|
||||
return strings.Contains(paramValue, text)
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user