mirror of
https://github.com/kataras/iris.git
synced 2025-12-29 15:57:09 +00:00
_future
1. Fix index, including both start and end. So Literal[start:end+1] will be a valid part. 2. Replace any with string, add file param type 3. Start of making the evaluator, starting with regexp for param types (these expression can be changed or/and overriden by user later on) Former-commit-id: ab95265f953dadbf84170b543e1ff8840f9c4a14
This commit is contained in:
@@ -4,25 +4,29 @@ type ParamType uint8
|
||||
|
||||
const (
|
||||
ParamTypeUnExpected ParamType = iota
|
||||
// /42
|
||||
ParamTypeInt
|
||||
// /myparam1
|
||||
ParamTypeString
|
||||
// /42
|
||||
ParamTypeInt
|
||||
// /myparam
|
||||
ParamTypeAlphabetical
|
||||
// /main.css
|
||||
ParamTypeFile
|
||||
// /myparam1/myparam2
|
||||
ParamTypePath
|
||||
)
|
||||
|
||||
var paramTypes = map[string]ParamType{
|
||||
"int": ParamTypeInt,
|
||||
"string": ParamTypeString,
|
||||
"int": ParamTypeInt,
|
||||
"alphabetical": ParamTypeAlphabetical,
|
||||
"file": ParamTypeFile,
|
||||
"path": ParamTypePath,
|
||||
// could be named also:
|
||||
// "tail":
|
||||
// "wild"
|
||||
// "wildcard"
|
||||
|
||||
}
|
||||
|
||||
func LookupParamType(ident string) ParamType {
|
||||
|
||||
Reference in New Issue
Block a user