You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I am trying to use this library for generating QR code. I am calling qrcode.PNG() function to get bytes of qrcode in PNG form.
But the problem is, i am not getting consistent results from this lib.
Below is my code:
qcode, err := qrcode.New("CONTENT-TO-BE-USED", qrcode.Medium)
if err != nil {
fmt.Println(err)
}
b, err := qcode.PNG(100) // tried different sizes like 256, 140, 130, and 100
if err != nil {
fmt.Println(err)
}
t.QRCode = string(b)
here t.QRCode is used in html template with image tag to load qr code on web page.
Anything is wrongly done here?
The text was updated successfully, but these errors were encountered:
this is probably cause by t.QRCode = string(b) which result incorrect html parsing, but i need the reproducable examples to know what is the real problem
I am trying to use this library for generating QR code. I am calling qrcode.PNG() function to get bytes of qrcode in PNG form.
But the problem is, i am not getting consistent results from this lib.
Below is my code:
here
t.QRCode
is used in html template with image tag to load qr code on web page.Anything is wrongly done here?
The text was updated successfully, but these errors were encountered: