hello.go 256 Bytes 编辑Web IDE 1 2 3 4 5 6 7 8 9 10 11 12 13 14 package api import ( "github.com/gogf/gf/net/ghttp" ) var Hello = helloApi{} type helloApi struct {} // Index is a demonstration route handler for output "Hello World!". func (*helloApi) Index(r *ghttp.Request) { r.Response.Writeln("Hello World!") }