Files
threshold/internal/cmd/base/ui.go
T
Jeff Mitchell 1ce09069a5 Move worker selection above session creation (#929)
This prevents a session being created when no workers are available to
handle it.
2021-02-12 11:05:33 -05:00

23 lines
271 B
Go

package base
import (
"os"
"github.com/mitchellh/cli"
"golang.org/x/term"
)
type BoundaryUI struct {
cli.Ui
Format string
}
var TermWidth uint = 80
func init() {
width, _, err := term.GetSize(int(os.Stdin.Fd()))
if err == nil {
TermWidth = uint(width)
}
}