12 2023 档案

摘要:使用容器部署golang项目时,饮用了 github.com/sony/sonyflake 生成snow id,初始化时不传入任何参数: SnowId = sonyflake.NewSonyflake(sonyflake.Settings{}) 在容器的ip设置设置为类似:192.18.10.8时, 阅读全文
posted @ 2023-12-25 09:30 熊先生不开玩笑 阅读(106) 评论(0) 推荐(0) 编辑
摘要:package main import ( "errors" "fmt" "github.com/gin-gonic/gin" "github.com/xuri/excelize/v2" ) func ReadExcel(file string, sheet string) ([][]string, 阅读全文
posted @ 2023-12-10 22:44 熊先生不开玩笑 阅读(421) 评论(0) 推荐(0) 编辑
摘要:package main import ( "bufio" "fmt" "github.com/axgle/mahonia" "io" "log" "os" ) func main() { filename := "/tmp/test.txt" readTbkByLine(filename) } / 阅读全文
posted @ 2023-12-10 22:29 熊先生不开玩笑 阅读(226) 评论(0) 推荐(0) 编辑
摘要:func Download(c *gin.Context) { c.Writer.WriteHeader(http.StatusOK) //设置文件类型 c.Header("Content-Type", "application/vnd.ms-excel;charset=utf8") // Path 阅读全文
posted @ 2023-12-04 18:24 熊先生不开玩笑 阅读(585) 评论(0) 推荐(0) 编辑

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