github.com/inhzus/go-berater@v0.0.0-20190602170559-fb80cb14726b/routes/v1/v1.go (about)

     1  package v1
     2  
     3  import (
     4  	"github.com/gin-gonic/gin"
     5  	"github.com/inhzus/go-berater/routes/v1/api"
     6  	"net/http"
     7  )
     8  
     9  func ping(c *gin.Context) {
    10  	c.JSON(http.StatusOK, gin.H{
    11  		"message": "pong",
    12  	})
    13  }
    14  
    15  func ApplyRoutes(group *gin.RouterGroup) {
    16  	v1 := group.Group("/v1")
    17  	{
    18  		v1.GET("/ping", ping)
    19  		api.ApplyRoutes(v1)
    20  	}
    21  }