From 288368acdeaa6b9487b6c85351ef3b31fd88689f Mon Sep 17 00:00:00 2001 From: Dinh QUang Date: Mon, 26 Aug 2024 22:02:39 +0700 Subject: [PATCH] fix --- main.go | 3 +++ 1 file changed, 3 insertions(+) diff --git a/main.go b/main.go index 9c2c186..cf70dfc 100644 --- a/main.go +++ b/main.go @@ -2,15 +2,18 @@ package main import ( "net/http" + "strconv" "github.com/gin-gonic/gin" ) func main() { router := gin.Default() + version := 1 router.GET("/ping/:name", func(c *gin.Context) { c.JSON(http.StatusOK, gin.H{ "message": "pong " + c.Params.ByName("name"), + "version": "v" + strconv.Itoa(version), }) })