mirror of
https://github.com/tailscale/tailscale.git
synced 2026-03-27 18:52:33 -04:00
QR codes are used by `tailscale up --qr` to provide an easy way to open a web-page without transcribing a difficult URI. However, there’s no need for this feature if the client will never be called interactively. So this PR adds the `ts_omit_qrcodes` build tag. Updates #18182 Signed-off-by: Simon Law <sfllaw@tailscale.com>
23 lines
610 B
Go
23 lines
610 B
Go
// Copyright (c) Tailscale Inc & AUTHORS
|
|
// SPDX-License-Identifier: BSD-3-Clause
|
|
|
|
package qrcodes
|
|
|
|
// Format selects the text representation used to print QR codes.
|
|
type Format string
|
|
|
|
const (
|
|
// FormatAuto will format QR codes to best fit the capabilities of the
|
|
// [io.Writer].
|
|
FormatAuto Format = "auto"
|
|
|
|
// FormatASCII will format QR codes with only ASCII characters.
|
|
FormatASCII Format = "ascii"
|
|
|
|
// FormatLarge will format QR codes with full block characters.
|
|
FormatLarge Format = "large"
|
|
|
|
// FormatSmall will format QR codes with full and half block characters.
|
|
FormatSmall Format = "small"
|
|
)
|