🔥码云GVP开源项目 12k star Uniapp+ElementUI 功能强大 支持多语言、二开方便! 广告
**boombuler/barcode生成二维码** github地址:https://github.com/boombuler/barcode 获取: ~~~ go get github.com/boombuler/barcode ~~~ 生成二维码图片: ~~~ package main import ( "image/png" "os" "github.com/boombuler/barcode" "github.com/boombuler/barcode/qr" ) func main() { qrCode, _ := qr.Encode("http://blog.csdn.net/wangshubo1989", qr.M, qr.Auto) qrCode, _ = barcode.Scale(qrCode, 256, 256) file, _ := os.Create("qr2.png") defer file.Close() png.Encode(file, qrCode) } ~~~