github.com/gogf/gf@v1.16.9/.example/os/gres/gres_example.go (about) 1 package main 2 3 import ( 4 _ "github.com/gogf/gf/os/gres/testdata/example/boot" 5 6 "github.com/gogf/gf/frame/g" 7 "github.com/gogf/gf/net/ghttp" 8 ) 9 10 func main() { 11 s := g.Server() 12 s.Group("/", func(group *ghttp.RouterGroup) { 13 group.GET("/template", func(r *ghttp.Request) { 14 r.Response.WriteTplDefault(g.Map{ 15 "name": "GoFrame", 16 }) 17 }) 18 }) 19 s.Run() 20 }