mirror of
https://github.com/infinite-iroha/touka.git
synced 2026-02-03 00:41:10 +08:00
refactor(internal break) Enhance static file serving for modularity and performance
This commit is contained in:
parent
49508b49c1
commit
989eb34c4c
3 changed files with 429 additions and 464 deletions
25
touka.go
25
touka.go
|
|
@ -42,3 +42,28 @@ type RouteInfo struct {
|
|||
Handler string // 处理函数名称
|
||||
Group string // 路由分组
|
||||
}
|
||||
|
||||
// 维护一个Methods列表
|
||||
var (
|
||||
MethodGet = "GET"
|
||||
MethodHead = "HEAD"
|
||||
MethodPost = "POST"
|
||||
MethodPut = "PUT"
|
||||
MethodPatch = "PATCH"
|
||||
MethodDelete = "DELETE"
|
||||
MethodConnect = "CONNECT"
|
||||
MethodOptions = "OPTIONS"
|
||||
MethodTrace = "TRACE"
|
||||
)
|
||||
|
||||
var MethodsSet = map[string]struct{}{
|
||||
MethodGet: {},
|
||||
MethodHead: {},
|
||||
MethodPost: {},
|
||||
MethodPut: {},
|
||||
MethodPatch: {},
|
||||
MethodDelete: {},
|
||||
MethodConnect: {},
|
||||
MethodOptions: {},
|
||||
MethodTrace: {},
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue