$ go get -u github.com/YuriyLisovskiy/qrcode/qr
Import package with
import "github.com/YuriyLisovskiy/qrcode/qr"// Text to encode.
const TEXT =
`
Nibh. Pulvinar enim porttitor tellus litora
nec vestibulum sit montes class, euismod odio
litora venenatis suscipit mi cras arcu a
dictum risus vestibulum parturient pellentesque
sociosqu vel rutrum a eros.
`
// Create an instance of Generator.
qrGen := qr.Generator{}
// Encode the text.
qrGen = qrGen.EncodeText(TEXT)
// Create an image of generated qr code.
qrGen.DrawImage("path/to/qr.png", 4, 500)- tests:
make test - demo:
make demo
This project is licensed under the Apache License 2.0 - see the LICENSE file for details.
