27 lines
437 B
Go
27 lines
437 B
Go
package main
|
|
|
|
import (
|
|
"github.com/gin-gonic/gin"
|
|
"interview-one-stop-server/handler"
|
|
)
|
|
|
|
var post = map[string]gin.HandlerFunc{}
|
|
|
|
var get = map[string]gin.HandlerFunc{
|
|
"/api/v1/question/list": handler.HandleQueryQuestionList,
|
|
}
|
|
|
|
func GetPostRouter() map[string]gin.HandlerFunc {
|
|
return post
|
|
}
|
|
|
|
func GetGetRouter() map[string]gin.HandlerFunc {
|
|
return get
|
|
}
|
|
|
|
func Ping(c *gin.Context) {
|
|
c.JSON(200, gin.H{
|
|
"message": "pong",
|
|
})
|
|
}
|