mirror of
https://gitee.com/johng/gf
synced 2026-07-04 21:03:13 +08:00
17 lines
291 B
Go
17 lines
291 B
Go
package main
|
|
|
|
import (
|
|
"github.com/gogf/gf/g"
|
|
"github.com/gogf/gf/g/net/ghttp"
|
|
)
|
|
|
|
// 试试模糊匹配规则不带名称会怎么样
|
|
func main() {
|
|
s := g.Server()
|
|
s.BindHandler("/hello/*", func(r *ghttp.Request) {
|
|
r.Response.Writeln("哈喽世界!")
|
|
})
|
|
s.SetPort(8199)
|
|
s.Run()
|
|
}
|