-
Notifications
You must be signed in to change notification settings - Fork 0
/
method.go
31 lines (29 loc) · 932 Bytes
/
method.go
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
/**
* @Author: dsreshiram@gmail.com
* @Date: 2022/7/17 下午 12:10
*/
package goweb
func (g *RouterGroup) GET(path string, handlerFunc HandlerFunc) {
g.handle(GET, path, handlerFunc)
}
func (g *RouterGroup) POST(path string, handlerFunc HandlerFunc) {
g.handle(POST, path, handlerFunc)
}
func (g *RouterGroup) PUT(path string, handlerFunc HandlerFunc) {
g.handle(PUT, path, handlerFunc)
}
func (g *RouterGroup) DELETE(path string, handlerFunc HandlerFunc) {
g.handle(DELETE, path, handlerFunc)
}
func (g *RouterGroup) HEAD(path string, handlerFunc HandlerFunc) {
g.handle(HEAD, path, handlerFunc)
}
func (g *RouterGroup) OPTIONS(path string, handlerFunc HandlerFunc) {
g.handle(OPTIONS, path, handlerFunc)
}
func (g *RouterGroup) CONNECT(path string, handlerFunc HandlerFunc) {
g.handle(CONNECT, path, handlerFunc)
}
func (g *RouterGroup) Any(path string, handlerFunc HandlerFunc) {
g.handle(ANY, path, handlerFunc)
}