func NewUI(config Config) (*UI, error) {
	translateFunc, err := GetTranslationFunc(config)
	if err != nil {
		return nil, err
	}
	location := time.Now().Location()
	return &UI{
		In:               os.Stdin,
		Out:              color.Output,
		OutForInteration: os.Stdout,
		Err:              os.Stderr,
		colorEnabled:     config.ColorEnabled(),
		translate:        translateFunc,
		terminalLock:     &sync.Mutex{},
		fileLock:         &sync.Mutex{},
		IsTTY:            config.IsTTY(),
		TerminalWidth:    config.TerminalWidth(),
		TimezoneLocation: location,
	}, nil
}
NewUI will return a UI object where Out is set to STDOUT, In is set to
STDIN, and Err is set to STDERR
package ui
import (
	"fmt"
	"io"
	"os"
	"strings"
	"sync"
	"time"
	"code.cloudfoundry.org/cli/command/translatableerror"
	"code.cloudfoundry.org/cli/util/configv3"
	"github.com/fatih/color"
	"github.com/lunixbochs/vtclean"
	runewidth "github.com/mattn/go-runewidth"
	"github.com/vito/go-interact/interact"
)
const LogTimestampFormat = "2006-01-02T15:04:05.00-0700"
const DefaultTableSpacePadding = 3
type Config interface {
	ColorEnabled() configv3.ColorSetting
	Locale() string
	IsTTY() bool
	TerminalWidth() int
}
type LogMessage interface {
	Message() string
	Type() string
	Timestamp() time.Time
	SourceType() string
	SourceInstance() string
}
type UI struct {
	In io.Reader
	Out io.Writer
	OutForInteration io.Writer
	Err io.Writer
	colorEnabled configv3.ColorSetting
	translate    TranslateFunc
	terminalLock *sync.Mutex
	fileLock     *sync.Mutex
	IsTTY         bool
	TerminalWidth int
	TimezoneLocation *time.Location
}