不为别的,只为做一个连自己都羡慕的人

01 2022 档案

摘要:1. 引入依赖库 github.com/gin-contrib/static 2. 配置默认页面 r := gin.Default() r.Use(static.Serve("/", static.LocalFile("templates/index.html", true))) 3. 关键点【解决 阅读全文
posted @ 2022-01-25 18:19 升级打怪 阅读(1325) 评论(0) 推荐(0) 编辑
摘要:r := gin.Default() //Get路由,动态路由 r.GET("/GetFile/:name", DowFile) // DowFile 文件在线预览func DowFile(c *gin.Context){ //通过动态路由方式获取文件名,以实现下载不同文件的功能 name:=c.P 阅读全文
posted @ 2022-01-25 17:33 升级打怪 阅读(685) 评论(0) 推荐(0) 编辑
摘要:post请求 projectName := c.PostForm("projectName") get请求 curr := c.Query("curr") 阅读全文
posted @ 2022-01-25 17:31 升级打怪 阅读(82) 评论(0) 推荐(0) 编辑
摘要://将字符串转为int类型 limitInt, _ := strconv.Atoi(limit) 阅读全文
posted @ 2022-01-25 17:27 升级打怪 阅读(571) 评论(0) 推荐(0) 编辑
摘要:// UploadCodeHandler 上传代码 func UploadCodeHandler(c *gin.Context){ userId := c.PostForm("userId") projectId := c.PostForm("projectId") fmt.Println(user 阅读全文
posted @ 2022-01-25 17:26 升级打怪 阅读(378) 评论(0) 推荐(0) 编辑
摘要:currTime :=time.Now().Format("2006-01-02 15:04:05") local, _ := time.LoadLocation("Local") t, _ := time.ParseInLocation("2006-01-02 15:04:05", currTim 阅读全文
posted @ 2022-01-14 15:33 升级打怪 阅读(37) 评论(0) 推荐(0) 编辑
摘要:1. 下载依赖 pip install yagmail 2. 获取授权码 授权码获取方式查看链接:https://www.cnblogs.com/lxz123/p/14962000.html(注:以前写的这种发送邮件的方式,在往公司邮箱(阿里邮箱)发送邮件的时候,显示发送成功,但是邮件收不到,后面改 阅读全文
posted @ 2022-01-14 13:42 升级打怪 阅读(141) 评论(0) 推荐(0) 编辑

点击右上角即可分享
微信分享提示