github.com/gogf/gf@v1.16.9/.example/net/ghttp/client/middleware/server.go (about) 1 package main 2 3 import ( 4 "github.com/gogf/gf/frame/g" 5 "github.com/gogf/gf/net/ghttp" 6 ) 7 8 func main() { 9 s := g.Server() 10 s.Group("/", func(group *ghttp.RouterGroup) { 11 group.ALL("/", func(r *ghttp.Request) { 12 r.Response.Write(r.GetMap()) 13 }) 14 }) 15 s.SetPort(8199) 16 s.Run() 17 }