mirror of
https://gitee.com/johng/gf
synced 2026-06-21 16:01:11 +08:00
19 lines
289 B
Go
19 lines
289 B
Go
package main
|
|
|
|
import (
|
|
"github.com/gogf/gf/frame/g"
|
|
"github.com/gogf/gf/net/ghttp"
|
|
)
|
|
|
|
func main() {
|
|
s := g.Server()
|
|
s.BindHandler("/", func(r *ghttp.Request) {
|
|
if r.GetInt("type") == 1 {
|
|
r.Response.Writeln("john")
|
|
}
|
|
r.Response.Writeln("smith")
|
|
})
|
|
s.SetPort(8199)
|
|
s.Run()
|
|
}
|