18 lines
312 B
Go
18 lines
312 B
Go
package main
|
|
|
|
import (
|
|
"fmt"
|
|
"github.com/skip2/go-qrcode"
|
|
)
|
|
|
|
func PrintQRCode(content string) {
|
|
qr, err := qrcode.New(content, qrcode.Medium)
|
|
if err != nil {
|
|
logger.Error("Failed to generate QR code: %v", err)
|
|
return
|
|
}
|
|
|
|
// Generate QR code as string (ASCII art)
|
|
fmt.Println(qr.ToSmallString(false))
|
|
}
|