Documentation
¶
Overview ¶
Package qr contains functions to interact with QR codes.
The package is imported like this:
import "github.com/gouniverse/qr"
Example ¶
To generate a QR code from a URL:
qr := qr.UrlToQr("https://example.com", 200, 200)
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func UrlToQr ¶
UrlToQr returns a QR code for the given URL
Parameters: - url string: the URL to generate the QR code for - width int: the width of the QR code - height int: the height of the QR code
Returns: - []byte: the QR code as a byte slice
func UrlToQrBase64 ¶
UrlToQrBase64 returns a Base64 encoded QR code for the given URL
Parameters: - url string: the URL to generate the QR code for - width int: the width of the QR code - height int: the height of the QR code
Returns: - string: the Base64 encoded QR code
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.