【更新】 项目初始化

This commit is contained in:
2025-07-16 15:15:02 +08:00
parent 6f3430bd72
commit 3cec8e7216
3 changed files with 126 additions and 0 deletions

14
main.go Normal file
View File

@@ -0,0 +1,14 @@
package main
import (
"net/http"
"github.com/gin-gonic/gin"
)
func main() {
r := gin.Default()
r.GET("/ping", func(c *gin.Context) {
c.JSON(http.StatusOK, gin.H{"message": "pong"})
})
r.Run(":8080") // 默认监听 0.0.0.0:8080
}