随笔分类 -  Go语言

摘要:Person: Please give me an example where gin implements server push and the front end receives data. ChatGPT: Sure! Here's an example of how you could 阅读全文
posted @ 2023-03-29 23:04 让速不让路 阅读(93) 评论(0) 推荐(0) 编辑
摘要:Person: How to implement login in the system using gin and html template? ChatGPT: To implement a login system using the Gin web framework and HTML te 阅读全文
posted @ 2023-03-25 15:22 让速不让路 阅读(1370) 评论(0) 推荐(0) 编辑
摘要:Person: JavaScript实现非对称加密 ChatGPT: JavaScript 可以使用公钥密码学算法来实现非对称加密。常用的公钥密码学算法包括 RSA 和 ECC。 下面是一个使用 RSA 算法实现非对称加密的示例: // 生成 RSA 密钥对 const { publicKey, p 阅读全文
posted @ 2023-03-25 11:30 让速不让路 阅读(756) 评论(0) 推荐(0) 编辑
摘要:##约定的列名 type User struct { ID uint // 列名是 `id` Name string // 列名是 `name` Birthday time.Time // 列名是 `birthday` CreatedAt time.Time // 列名是 `created_at` 阅读全文
posted @ 2022-08-14 23:54 让速不让路 阅读(35) 评论(0) 推荐(0) 编辑
摘要:时间日期格式化 time.Now().Format("2006-01-02") 原生DefaultServeMux支持restful路由 ref: https://towardsdev.com/how-to-create-rest-api-in-golang-6448d1de294c package 阅读全文
posted @ 2020-01-16 23:40 让速不让路 阅读(99) 评论(0) 推荐(0) 编辑

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