github.com/emc-advanced-dev/unik@v0.0.0-20190717152701-a58d3e8e33b7/docs/examples/example_godeps_go_app/gin_server.go (about)

     1  package main
     2  
     3  import "github.com/gin-gonic/gin"
     4  
     5  func main() {
     6  	r := gin.Default()
     7  	r.GET("/ping", func(c *gin.Context) {
     8  		c.JSON(200, gin.H{
     9  			"message": "pong",
    10  		})
    11  	})
    12  	r.Run() // listen and server on 0.0.0.0:8080
    13  }