1234567891011121314151617 |
- package qr
- import (
- "os/exec"
- "github.com/skip2/go-qrcode"
- )
- // RenderString as a QR code
- func RenderString(s string) {
- err := qrcode.WriteFile(s, qrcode.Medium, 200, "tmp.png")
- if err != nil {
- panic(err)
- }
- cmd:=exec.Command("rundll32.exe", "url.dll,FileProtocolHandler", "tmp.png")
- cmd.Start()
- }
|