grbinder
Gin route binder
usage
type statusHandler struct {
}
func (h *statusHandler) GET(c *gin.Context) {
c.JSON(http.StatusOK, gin.H{"status": "OK"})
}
router := gin.Default()
grbinder.BindVerb(router.Group("/status"), &statusHandler{})
Gin route binder
go get github.com/vanng822/grbinder
Gin route binder
type statusHandler struct {
}
func (h *statusHandler) GET(c *gin.Context) {
c.JSON(http.StatusOK, gin.H{"status": "OK"})
}
router := gin.Default()
grbinder.BindVerb(router.Group("/status"), &statusHandler{})