18 lines
217 B
Go
18 lines
217 B
Go
|
package main
|
||
|
|
||
|
import (
|
||
|
"net/http"
|
||
|
|
||
|
"github.com/gin-gonic/gin"
|
||
|
)
|
||
|
|
||
|
func main() {
|
||
|
r := gin.Default()
|
||
|
r.GET("/ping", func(ctx *gin.Context) {
|
||
|
ctx.JSON(http.StatusOK, gin.H{
|
||
|
"message": "pong",
|
||
|
})
|
||
|
})
|
||
|
r.Run()
|
||
|
}
|