摘要: 1.返回byte和string类型 context.Writer.Write([]byte("fullpath="+fullpath)) context.Writer.WriteString("fullpath"+fullpath) 2.返回JSON package main import ( "g 阅读全文
posted @ 2021-01-10 22:18 FinnYY 阅读(1093) 评论(0) 推荐(0) 编辑
摘要: 1.ShouldBindQuery(获取GET)和ShouldBind(获取POST) package main import ( "fmt" "github.com/gin-gonic/gin" "log" ) func main(){ engine := gin.Default() engine 阅读全文
posted @ 2021-01-10 16:45 FinnYY 阅读(163) 评论(0) 推荐(0) 编辑