init
This commit is contained in:
15
serve/api/handlers/hello_handler.go
Normal file
15
serve/api/handlers/hello_handler.go
Normal file
@@ -0,0 +1,15 @@
|
||||
// api/handlers/hello_handler.go
|
||||
package handlers
|
||||
|
||||
import (
|
||||
"net/http"
|
||||
|
||||
"github.com/gin-gonic/gin"
|
||||
)
|
||||
|
||||
// HelloHandler 处理 /hello 请求
|
||||
func HelloHandler(c *gin.Context) {
|
||||
c.JSON(http.StatusOK, gin.H{
|
||||
"message": "Hello from a structured project!",
|
||||
})
|
||||
}
|
||||
Reference in New Issue
Block a user