diff --git a/main.go b/main.go index aa016d3..36af177 100644 --- a/main.go +++ b/main.go @@ -16,8 +16,6 @@ import ( "weatherstation/config" "weatherstation/model" - - "github.com/gin-gonic/gin" ) type UTF8Writer struct { @@ -164,15 +162,7 @@ func startUDP() { func main() { setupLogger() - go startUDP() - - r := gin.Default() - r.LoadHTMLGlob("templates/*") - r.Static("/static", "static") - r.GET("/", func(c *gin.Context) { - c.HTML(200, "index.html", gin.H{}) - }) - r.Run(":10007") + startUDP() // 直接运行UDP服务器,不再使用goroutine } func hexDump(data []byte) string {