Gin 基础 :

Gin 的hello world :

package main

import (
    "github.com/gin-gonic/gin"
    "net/http"
)
func main()  {
    engine := gin.Default()
    engine.GET("/", func(context *gin.Context) {
        context.String(http.StatusOK,"hello world!")
    })
    engine.Run()
}
View Code

相关文章: