qr

package
v0.7.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Apr 3, 2025 License: AGPL-3.0 Imports: 5 Imported by: 0

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

func UrlToQr(url string, width int, height int) []byte

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

func UrlToQrBase64(url string, width int, height int) string

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.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL