terminal

package module
v0.0.0-...-230eed9 Latest Latest
Warning

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

Go to latest
Published: Nov 7, 2022 License: MIT Imports: 2 Imported by: 0

README

Terminal

go.dev reference

Standard Writer is a writer that is used to draw QR Code image into terminal.

Usage

package main

import (
	"github.com/yeqown/go-qrcode/v2"
	"github.com/yeqown/go-qrcode/writer/terminal"
)

func main() {
	qrc, _ := qrcode.New("withTerminalWriter")

	w := terminal.New()
	
	if err := qrc.Save(w); err != nil {
		panic(err)
	}
}

Option

🤪 Do not support any option yet.

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Writer

type Writer struct{}

Writer implements qrcode.Writer based on termbox to print QRCode into terminal / console.

func New

func New() *Writer

func (Writer) Close

func (w Writer) Close() error

func (Writer) Write

func (w Writer) Write(mat qrcode.Matrix) error

Jump to

Keyboard shortcuts

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