Enforce colorized output for QR code.
parent
c7bd31c631
commit
b6b245c65e
|
@ -5,6 +5,7 @@ import (
|
||||||
"io"
|
"io"
|
||||||
"log"
|
"log"
|
||||||
|
|
||||||
|
"github.com/fatih/color"
|
||||||
"github.com/gliderlabs/ssh"
|
"github.com/gliderlabs/ssh"
|
||||||
"github.com/qpliu/qrencode-go/qrencode"
|
"github.com/qpliu/qrencode-go/qrencode"
|
||||||
|
|
||||||
|
@ -14,6 +15,8 @@ import (
|
||||||
func main() {
|
func main() {
|
||||||
greeting := "https://git.icedream.tech/icedream/pixelqr"
|
greeting := "https://git.icedream.tech/icedream/pixelqr"
|
||||||
|
|
||||||
|
color.NoColor = false
|
||||||
|
|
||||||
ssh.Handle(func(s ssh.Session) {
|
ssh.Handle(func(s ssh.Session) {
|
||||||
grid, err := qrencode.Encode(greeting, qrencode.ECLevelQ)
|
grid, err := qrencode.Encode(greeting, qrencode.ECLevelQ)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
|
|
Loading…
Reference in New Issue