Beego 静态文件处理 2022年9月27日 | golang beego 静态文件注册: beego.SetStaticPath("/attachment","static/attachment") beego.SetStaticPath("/public","static/public") 第一个参数是路径,ur…… 阅读全文
Golang 设置时区 2022年9月6日 | golang 1. 使用 time.FixedZone (推荐) import ( "fmt" "time" ) func main() { //东八…… 阅读全文
Gin框架解决跨域问题 2022年8月26日 | golang package main import ( "github.com/gin-gonic/gin" "strings" "fmt" "net/http" ) func main() { r := gin.Default() r.Use(Cors()) //开启…… 阅读全文
Golang下载文件并解析文件名 2022年3月29日 | golang 下载文件时,文件名存在返回头的 Content-Disposition 中 格式 Content-Disposition:…… 阅读全文
国密sm2 golang使用 2022年3月28日 | 实用工具 golang package main import ( "bytes" "crypto/rand" "encoding/base64" "encoding/hex" "fmt" "github.com/tjfoc/gmsm/x509" ) func main() { //公钥 var sm2PublicKey…… 阅读全文