Documentation
¶
Index ¶
- Variables
- func TermCols() int
- func TermRows() int
- func WriteLineNoWrap(out io.StringWriter, s string)
- type BufferedTerm
- type MultilineTerm
- type NullTerm
- type TermWriter
- type VirtualTerm
- func (s *VirtualTerm) Close()
- func (s *VirtualTerm) Get(line int) string
- func (s *VirtualTerm) IsClosed() bool
- func (s *VirtualTerm) LineCount() int
- func (s *VirtualTerm) WriteForLine(line int, text string)
- func (s *VirtualTerm) WriteForLinef(line int, format string, args ...interface{})
- func (s *VirtualTerm) WriteToOutput(out io.StringWriter)
Constants ¶
This section is empty.
Variables ¶
View Source
var AutoTrim = true
Functions ¶
func WriteLineNoWrap ¶
func WriteLineNoWrap(out io.StringWriter, s string)
Types ¶
type BufferedTerm ¶
type BufferedTerm struct {
*VirtualTerm
}
func (*BufferedTerm) Close ¶
func (s *BufferedTerm) Close()
type MultilineTerm ¶
type NullTerm ¶
type NullTerm struct{}
func (*NullTerm) WriteForLine ¶
func (*NullTerm) WriteForLinef ¶
type TermWriter ¶
func New ¶
func New() *TermWriter
func NewEx ¶
func NewEx(w io.StringWriter) *TermWriter
func (*TermWriter) Close ¶
func (s *TermWriter) Close()
func (*TermWriter) WriteForLine ¶
func (s *TermWriter) WriteForLine(line int, text string)
func (*TermWriter) WriteForLinef ¶
func (s *TermWriter) WriteForLinef(line int, format string, args ...interface{})
type VirtualTerm ¶
type VirtualTerm struct {
// contains filtered or unexported fields
}
func NewVirtualTerm ¶
func NewVirtualTerm() *VirtualTerm
func NewVirtualTermEx ¶
func NewVirtualTermEx(size, cap int) *VirtualTerm
func (*VirtualTerm) Close ¶
func (s *VirtualTerm) Close()
Close the virtual term. Doesn't ever really need to close, but useful in testing
func (*VirtualTerm) Get ¶
func (s *VirtualTerm) Get(line int) string
func (*VirtualTerm) IsClosed ¶
func (s *VirtualTerm) IsClosed() bool
IsClosed checks if Close() was called
func (*VirtualTerm) LineCount ¶
func (s *VirtualTerm) LineCount() int
func (*VirtualTerm) WriteForLine ¶
func (s *VirtualTerm) WriteForLine(line int, text string)
func (*VirtualTerm) WriteForLinef ¶
func (s *VirtualTerm) WriteForLinef(line int, format string, args ...interface{})
func (*VirtualTerm) WriteToOutput ¶
func (s *VirtualTerm) WriteToOutput(out io.StringWriter)
WriteToOutput writes to a terminal, preventing any potential wrapping
Source Files
¶
Click to show internal directories.
Click to hide internal directories.