Versions in this module Expand all Collapse all v0 v0.14.15 Jan 31, 2022 v0.14.14 Jan 30, 2022 Changes in this version + const SupportsColorEscapes + var TerminalColors = Colors + func PlatformIndependentPathDirBaseExt(path string) (dir string, base string, ext string) + func PrintErrorToStderr(osArgs []string, text string) + func PrintMessageToStderr(osArgs []string, msg Msg) + func PrintSummary(useColor UseColor, table SummaryTable, start *time.Time) + func PrintText(file *os.File, level LogLevel, osArgs []string, callback func(Colors) string) + func PrintTextWithColor(file *os.File, useColor UseColor, callback func(Colors) string) + type APIKind uint8 + const CLIAPI + const GoAPI + const JSAPI + var API APIKind + type Colors struct + Blue string + Bold string + Cyan string + Dim string + Green string + Magenta string + Red string + Reset string + Underline string + Yellow string + type DeferLogKind uint8 + const DeferLogAll + const DeferLogNoVerboseOrDebug + type LineColumnTracker struct + func MakeLineColumnTracker(source *Source) LineColumnTracker + type Loc struct + Start int32 + type Log struct + AddMsg func(Msg) + AlmostDone func() + Done func() []Msg + HasErrors func() bool + Level LogLevel + func NewDeferLog(kind DeferLogKind) Log + func NewStderrLog(options OutputOptions) Log + func (log Log) AddDebug(tracker *LineColumnTracker, loc Loc, text string) + func (log Log) AddDebugWithNotes(tracker *LineColumnTracker, loc Loc, text string, notes []MsgData) + func (log Log) AddError(tracker *LineColumnTracker, loc Loc, text string) + func (log Log) AddErrorWithNotes(tracker *LineColumnTracker, loc Loc, text string, notes []MsgData) + func (log Log) AddRangeDebug(tracker *LineColumnTracker, r Range, text string) + func (log Log) AddRangeDebugWithNotes(tracker *LineColumnTracker, r Range, text string, notes []MsgData) + func (log Log) AddRangeError(tracker *LineColumnTracker, r Range, text string) + func (log Log) AddRangeErrorWithNotes(tracker *LineColumnTracker, r Range, text string, notes []MsgData) + func (log Log) AddRangeWarning(tracker *LineColumnTracker, r Range, text string) + func (log Log) AddRangeWarningWithNotes(tracker *LineColumnTracker, r Range, text string, notes []MsgData) + func (log Log) AddVerbose(tracker *LineColumnTracker, loc Loc, text string) + func (log Log) AddVerboseWithNotes(tracker *LineColumnTracker, loc Loc, text string, notes []MsgData) + func (log Log) AddWarning(tracker *LineColumnTracker, loc Loc, text string) + type LogLevel int8 + const LevelDebug + const LevelError + const LevelInfo + const LevelNone + const LevelSilent + const LevelVerbose + const LevelWarning + type Msg struct + Data MsgData + Kind MsgKind + Notes []MsgData + PluginName string + func (msg Msg) String(options OutputOptions, terminalInfo TerminalInfo) string + type MsgData struct + Location *MsgLocation + Text string + UserDetail interface{} + func RangeData(tracker *LineColumnTracker, r Range, text string) MsgData + type MsgDetail struct + Column int + ContentAfter string + Indent string + Line int + Marker string + Path string + SourceAfter string + SourceBefore string + SourceMarked string + Suggestion string + type MsgKind uint8 + const Debug + const Error + const Info + const Note + const Verbose + const Warning + func (kind MsgKind) String() string + type MsgLocation struct + Column int + File string + Length int + Line int + LineText string + Namespace string + Suggestion string + func LocationOrNil(tracker *LineColumnTracker, r Range) *MsgLocation + type OutputOptions struct + Color UseColor + IncludeSource bool + LogLevel LogLevel + MessageLimit int + func OutputOptionsForArgs(osArgs []string) OutputOptions + type Path struct + Flags PathFlags + IgnoredSuffix string + Namespace string + Text string + func (a Path) ComesBeforeInSortedOrder(b Path) bool + func (p Path) IsDisabled() bool + type PathFlags uint8 + const PathDisabled + type Range struct + Len int32 + Loc Loc + func (r Range) End() int32 + type SortableMsgs []Msg + func (a SortableMsgs) Len() int + func (a SortableMsgs) Less(i int, j int) bool + func (a SortableMsgs) Swap(i int, j int) + type Source struct + Contents string + IdentifierName string + Index uint32 + KeyPath Path + PrettyPath string + func (s *Source) RangeOfLegacyOctalEscape(loc Loc) (r Range) + func (s *Source) RangeOfNumber(loc Loc) (r Range) + func (s *Source) RangeOfOperatorAfter(loc Loc, op string) Range + func (s *Source) RangeOfOperatorBefore(loc Loc, op string) Range + func (s *Source) RangeOfString(loc Loc) Range + func (s *Source) TextForRange(r Range) string + type Span struct + Range Range + Text string + type SummaryTable []SummaryTableEntry + func (t SummaryTable) Len() int + func (t SummaryTable) Less(i int, j int) bool + func (t SummaryTable) Swap(i int, j int) + type SummaryTableEntry struct + Base string + Bytes int + Dir string + IsSourceMap bool + Size string + type TerminalInfo struct + Height int + IsTTY bool + UseColorEscapes bool + Width int + func GetTerminalInfo(*os.File) TerminalInfo + func GetTerminalInfo(file *os.File) (info TerminalInfo) + func GetTerminalInfo(file *os.File) TerminalInfo + type UseColor uint8 + const ColorAlways + const ColorIfTerminal + const ColorNever