Documentation ¶
Index ¶
- Constants
- Variables
- func CaptureStdout(f func()) string
- func CollapseReturns(input string) string
- func Debugf(s string, i ...interface{})
- func DecodeCursor(cursor string) (lineDelta, columnDelta int)
- func DumpNode(node ast.Node, source []byte) string
- func FileExists(name string) bool
- func FindFile(files []string) string
- func GetConsoleWidth() int
- func InspectList(l []string) string
- func InspectString(s string) string
- func IntMin(a, b int) int
- func MakeRelative(filename string) string
- func NodeLines(v ast.Node, source []byte) string
- func RandomString() string
- func ReadAndFormatOutput(reader io.Reader, indent int, prefix string, ...) bool
- func RedirectLogger(w io.Writer)
- func RemoveColors(input string) string
- func SetLoggerLevel(level string)
- func SubEnv(environment map[string]string, source string) string
- type DummySpinner
- func (s *DummySpinner) Active() bool
- func (s *DummySpinner) CurrentHeading() string
- func (s *DummySpinner) Error(message string)
- func (s *DummySpinner) HideAndExecute(f func())
- func (s *DummySpinner) NewStep(message string)
- func (s *DummySpinner) SetMessage(message string)
- func (s *DummySpinner) Skip(message string)
- func (s *DummySpinner) Spin()
- func (s *DummySpinner) Start()
- func (s *DummySpinner) Stop()
- func (s *DummySpinner) Success(message string)
- type Line
- type ProgressIndicator
- type TokenResult
- type WordWrapWriter
Constants ¶
View Source
const StartOfLine = -999
Variables ¶
View Source
var Logger zerolog.Logger
View Source
var VariableDetection = regexp.MustCompile(`(?i)\$([a-z0-9_]+)|\${([a-z0-9_]+)(([^a-z0-9_]+)(.*?))?}`)
Functions ¶
func CaptureStdout ¶
func CaptureStdout(f func()) string
func CollapseReturns ¶
func DecodeCursor ¶
func FileExists ¶
func FindFile ¶
Finds a file in the current directory or parents. Files are checked in the order they're provided.
func GetConsoleWidth ¶
func GetConsoleWidth() int
func InspectList ¶
func InspectString ¶
func MakeRelative ¶
func RandomString ¶
func RandomString() string
func ReadAndFormatOutput ¶
func RedirectLogger ¶
func RemoveColors ¶
func SetLoggerLevel ¶
func SetLoggerLevel(level string)
Types ¶
type DummySpinner ¶
type DummySpinner struct {
// contains filtered or unexported fields
}
func NewDummySpinner ¶
func NewDummySpinner() *DummySpinner
func (*DummySpinner) Active ¶
func (s *DummySpinner) Active() bool
func (*DummySpinner) CurrentHeading ¶
func (s *DummySpinner) CurrentHeading() string
func (*DummySpinner) Error ¶
func (s *DummySpinner) Error(message string)
func (*DummySpinner) HideAndExecute ¶
func (s *DummySpinner) HideAndExecute(f func())
func (*DummySpinner) NewStep ¶
func (s *DummySpinner) NewStep(message string)
func (*DummySpinner) SetMessage ¶
func (s *DummySpinner) SetMessage(message string)
func (*DummySpinner) Skip ¶
func (s *DummySpinner) Skip(message string)
func (*DummySpinner) Spin ¶
func (s *DummySpinner) Spin()
func (*DummySpinner) Start ¶
func (s *DummySpinner) Start()
func (*DummySpinner) Stop ¶
func (s *DummySpinner) Stop()
func (*DummySpinner) Success ¶
func (s *DummySpinner) Success(message string)
type Line ¶
func (*Line) MoveCursor ¶
type ProgressIndicator ¶
type TokenResult ¶
type TokenResult int
const ( TokenCursor TokenResult = iota + 1 TokenColour TokenWhitespace TokenDisplayStream TokenEmpty )
type WordWrapWriter ¶
type WordWrapWriter struct { io.Writer AfterWrap func(writer io.Writer) int CurrentLinePos int Columns int // contains filtered or unexported fields }
func NewWordWrapWriter ¶
func NewWordWrapWriter(out io.Writer, columns int) *WordWrapWriter
func (*WordWrapWriter) Reset ¶
func (w *WordWrapWriter) Reset()
func (*WordWrapWriter) SetAfterWrap ¶
func (w *WordWrapWriter) SetAfterWrap(wrapper func(writer io.Writer) int)
Click to show internal directories.
Click to hide internal directories.