Skip to content

Instantly share code, notes, and snippets.

@PxyUp
Created October 9, 2019 22:01
Show Gist options
  • 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