摘要: 目前知道gin是基于net/http进一步封装,来看下net/http是怎样写web的 package main import ( "fmt" "net/http" ) func index(w http.ResponseWriter, r *http.Request) { fmt.Fprintln 阅读全文
posted @ 2024-01-20 21:27 codestacklinuxer 阅读(72) 评论(0) 推荐(0)
摘要: package main import ( "net/http" "github.com/gin-gonic/gin" ) func main() { r := gin.Default() r.GET("/", func(c *gin.Context) { c.String(200, "Hello! 阅读全文
posted @ 2024-01-20 17:53 codestacklinuxer 阅读(82) 评论(0) 推荐(0)