1
0
mirror of https://github.com/kataras/iris.git synced 2025-12-29 15:57:09 +00:00

add my new trie data structure implementation written from scratch and specifically designed for HTTP (and Iris) - see https://github.com/kataras/muxie for the net/http version of it

Former-commit-id: 4eed1585f29b57418b61f6de058f5d6db4bb98bf
This commit is contained in:
Gerasimos (Makis) Maropoulos
2018-10-15 10:49:09 +03:00
parent 29a4354e1d
commit 3002736086
24 changed files with 575 additions and 648 deletions

View File

@@ -35,7 +35,7 @@ func main() {
// anything
//
// +-------------------------------+
// | {param:int} or {param:number} |
// | {param:int} or {param:int} |
// +-------------------------------+
// int type
// both positive and negative numbers, any number of digits (ctx.Params().GetInt will limit the digits based on the host arch)
@@ -209,7 +209,7 @@ func main() {
// http://localhost:8080/game/a-zA-Z/level/42
// remember, alphabetical is lowercase or uppercase letters only.
app.Get("/game/{name:alphabetical}/level/{level:number}", func(ctx iris.Context) {
app.Get("/game/{name:alphabetical}/level/{level:int}", func(ctx iris.Context) {
ctx.Writef("name: %s | level: %s", ctx.Params().Get("name"), ctx.Params().Get("level"))
})