|
|
@ -10,6 +10,7 @@ import ( |
|
|
|
"os" |
|
|
|
"encoding/pem" |
|
|
|
"github.com/glendc/go-external-ip" |
|
|
|
qrcode "github.com/skip2/go-qrcode" |
|
|
|
) |
|
|
|
|
|
|
|
type certificates struct { |
|
|
@ -99,6 +100,9 @@ func main() { |
|
|
|
|
|
|
|
if loadedConfig.ZapConnect.Json { |
|
|
|
fmt.Println(string(certB)) |
|
|
|
} else if loadedConfig.ZapConnect.Image { |
|
|
|
qrcode.WriteFile(string(certB), qrcode.Medium, 512, "zapconnect-qr.png") |
|
|
|
fmt.Println("Outputed QRCode to file \"zapconnect-qr.png\"") |
|
|
|
} else { |
|
|
|
obj := qrcodeTerminal.New() |
|
|
|
obj.Get(string(certB)).Print() |
|
|
|