mirror of
https://github.com/kataras/iris.git
synced 2025-12-21 20:07:04 +00:00
make macros even faster and smart catch common :string and do not execute anything at all if not really needed, more clean code as well
Former-commit-id: 589c23d1f92cf36b7677dfe78b60d51252c979fb
This commit is contained in:
@@ -10,7 +10,7 @@ import (
|
||||
var (
|
||||
// String type
|
||||
// Allows anything (single path segment, as everything except the `Path`).
|
||||
String = NewMacro("string", "", true, false, nil). // if nil allows everything.
|
||||
String = NewMacro("string", "", true, false, nil).
|
||||
RegisterFunc("regexp", func(expr string) func(string) bool {
|
||||
return MustRegexp(expr)
|
||||
}).
|
||||
|
||||
Reference in New Issue
Block a user