hotime/example/main.go

26 lines
404 B
Go
Raw Normal View History

2022-07-11 11:07:17 +08:00
package main
import (
. "code.hoteas.com/golang/hotime"
. "code.hoteas.com/golang/hotime/common"
2022-07-11 11:07:17 +08:00
)
func main() {
appIns := Init("config/config.json")
2022-08-01 03:40:09 +08:00
appIns.SetConnectListener(func(that *Context) (isFinished bool) {
return isFinished
})
2022-08-02 03:02:57 +08:00
appIns.Run(Router{
"app": {
"test": {
"hello": func(that *Context) {
that.Display(0, Map{"message": "Hello World"})
},
},
},
})
2022-07-11 11:07:17 +08:00
}