mirror of
https://gitee.com/johng/gf
synced 2026-06-29 18:41:50 +08:00
18 lines
326 B
Go
18 lines
326 B
Go
package main
|
|
|
|
import (
|
|
"github.com/gogf/gf/v2/frame/g"
|
|
"github.com/gogf/gf/v2/net/ghttp"
|
|
)
|
|
|
|
func main() {
|
|
s := g.Server()
|
|
s.BindHandler("/", func(r *ghttp.Request) {
|
|
r.Response.Writeln(r.Get("amount"))
|
|
r.Response.Writeln(r.GetInt("amount"))
|
|
r.Response.Writeln(r.GetFloat32("amount"))
|
|
})
|
|
s.SetPort(8199)
|
|
s.Run()
|
|
}
|