Skip to content

Instantly share code, notes, and snippets.

@cn007b
Created December 4, 2018 12:31
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save cn007b/318180624ee1bbe1c444439004cae761 to your computer and use it in GitHub Desktop.
Save cn007b/318180624ee1bbe1c444439004cae761 to your computer and use it in GitHub Desktop.
Plain Go vs Gin - gin
package main
import (
"github.com/gin-gonic/gin"
)
func main() {
r := gin.Default()
r.GET("/v1/id/:id", func(c *gin.Context) {
c.JSON(200, gin.H{
"id": c.Param("id"),
})
})
r.Run()
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment