mirror of
https://gitee.com/johng/gf
synced 2026-06-22 16:14:26 +08:00
23 lines
346 B
Go
23 lines
346 B
Go
package main
|
|
|
|
import (
|
|
"github.com/gogf/gf/frame/g"
|
|
"github.com/gogf/gf/net/ghttp"
|
|
)
|
|
|
|
type User struct{}
|
|
|
|
func (c *User) Test(r *ghttp.Request) {
|
|
r.Response.Write("Test")
|
|
}
|
|
|
|
func main() {
|
|
s := g.Server()
|
|
u := new(User)
|
|
s.Group("/", func(group *ghttp.RouterGroup) {
|
|
group.GET("/db-{table}/{id}", u, "Test")
|
|
})
|
|
s.SetPort(8199)
|
|
s.Run()
|
|
}
|