Help us shape the future of Go! Take the 2026 Go Developer Survey

qrcode

package
v0.17.2 Latest Latest
Warning

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

Go to latest
Published: Nov 2, 2026 License: AGPL-3.0 Imports: 3 Imported by: 0

Documentation

Overview

Package qrcode draws QR codes: an SVG for the console and API, and text for a terminal. Used for the authenticator app setup of R-405.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func SVG

func SVG(text string) (string, error)

SVG draws text as a QR code, an SVG of black modules on white. Drawn here rather than in the console so every client of the API gets the same picture, and black on white whatever the page's theme, because that is what a phone's camera reads most reliably.

func Text

func Text(text string) (string, error)

Text draws text as a QR code in a terminal, two rows of modules to a line with half-block characters, for `pando two-factor setup`. Dark modules are spaces and light ones are filled, so on a dark terminal the code reads as black on white; the quiet zone is drawn too, since a terminal's own background is not one.

Types

This section is empty.

Jump to

Keyboard shortcuts

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