Created
October 9, 2019 22:01
-
-
Save PxyUp/c885ad262f74149f70437adb19df4403 to your computer and use it in GitHub Desktop.
Health handler
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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