Skip to content

Instantly share code, notes, and snippets.

@PxyUp
Created October 9, 2019 22:01
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save PxyUp/c885ad262f74149f70437adb19df4403 to your computer and use it in GitHub Desktop.
Save PxyUp/c885ad262f74149f70437adb19df4403 to your computer and use it in GitHub Desktop.
Health handler
package health
import (
"github.com/gin-gonic/gin"
"net/http"
)
func Health(appName string) func(c *gin.Context){
return func(c *gin.Context) {
c.JSON(http.StatusOK, gin.H{
"Hello": "Hello from " + appName,
})
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment