qrcode

package
v1.0.1 Latest Latest
Warning

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

Go to latest
Published: Jan 26, 2026 License: MIT Imports: 2 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var CharSets = map[string]struct {
	Full  string
	Empty string
}{
	"blocks":  {"██", "  "},
	"shaded":  {"▓▓", "░░"},
	"dots":    {"●●", "  "},
	"ascii":   {"##", "  "},
	"braille": {"⣿⣿", "⠀⠀"},
	"compact": {"█", " "},
	"inverse": {"  ", "██"},
	"minimal": {"▀", " "},
	"half":    {"▄▄", "  "},
}

CharSets for QR code rendering

Functions

func Generate

func Generate(text string, opts Options) (string, error)

Generate creates an ASCII QR code from text

func GenerateCompact

func GenerateCompact(text string, invert bool) (string, error)

GenerateCompact creates a compact QR using half-block characters

func ListCharsets

func ListCharsets() []string

ListCharsets returns available charset names

Types

type Options

type Options struct {
	Size    int
	Charset string
	Invert  bool
	ANSI    bool
}

Options for QR code generation

Jump to

Keyboard shortcuts

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