Commit 86cfbd05 authored by szh's avatar szh

add serial cache

parent 8cbc11a0
......@@ -26,7 +26,7 @@ func init() {
}
var tlog = log.New("main", "main.go")
var serial string
// @title Golang Gin API
// @version 1.0
// @description An example of gin
......@@ -82,10 +82,16 @@ func main() {
func broadcast() {
var pai pai_service.Pai
send := "hello world"
ok := pai.GetConfig()
if ok {
send = pai.Serial
if serial != "" {
send = serial
} else {
ok := pai.GetConfig()
if ok {
send = pai.Serial
serial = pai.Serial
}
}
//ip 会变化
ip,err := util.GetLocalIP()
if err != nil {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment