package logging
import "github.com/evanw/esbuild/internal/logging"
Index ¶
- Constants
- func ComputeLineAndColumn(text string) (lineCount int, columnCount, lastLineStart int)
- type Log
- func NewDeferLog() (Log, func() []Msg)
- func NewLog(msgs chan Msg) Log
- func NewStderrLog(options StderrOptions) (Log, func() MsgCounts)
- func (log Log) AddError(source Source, loc ast.Loc, text string)
- func (log Log) AddRangeError(source Source, r ast.Range, text string)
- func (log Log) AddRangeWarning(source Source, r ast.Range, text string)
- func (log Log) AddWarning(source Source, loc ast.Loc, text string)
- type Msg
- type MsgCounts
- type MsgDetail
- type MsgKind
- type Source
- func (s *Source) RangeOfString(loc ast.Loc) ast.Range
- func (s *Source) TextForRange(r ast.Range) string
- type StderrColor
- type StderrOptions
- type TerminalInfo
Constants ¶
const SupportsColorEscapes = false
Functions ¶
func ComputeLineAndColumn ¶
Types ¶
type Log ¶
type Log struct {
// contains filtered or unexported fields
}
func NewDeferLog ¶
func NewLog ¶
func NewStderrLog ¶
func NewStderrLog(options StderrOptions) (Log, func() MsgCounts)
func (Log) AddError ¶
func (Log) AddRangeError ¶
func (Log) AddRangeWarning ¶
func (Log) AddWarning ¶
type Msg ¶
func (Msg) String ¶
func (msg Msg) String(options StderrOptions, terminalInfo TerminalInfo) string
type MsgCounts ¶
func (MsgCounts) String ¶
type MsgDetail ¶
type MsgDetail struct { Path string Line int Column int Kind string Message string // Source == SourceBefore + SourceMarked + SourceAfter Source string SourceBefore string SourceMarked string SourceAfter string Indent string Marker string }
type MsgKind ¶
type MsgKind int
type Source ¶
type Source struct { Index uint32 IsStdin bool AbsolutePath string PrettyPath string Contents string }
func (*Source) RangeOfString ¶
func (*Source) TextForRange ¶
type StderrColor ¶
type StderrColor uint8
const ( ColorIfTerminal StderrColor = iota ColorNever ColorAlways )
type StderrOptions ¶
type StderrOptions struct { IncludeSource bool ErrorLimit int ExitWhenLimitIsHit bool Color StderrColor }
type TerminalInfo ¶
func GetTerminalInfo ¶
func GetTerminalInfo(*os.File) TerminalInfo
Source Files ¶
- Version
- v0.3.6
- Published
- May 21, 2020
- Platform
- windows/amd64
- Imports
- 4 packages
- Last checked
- 2 hours ago –
Tools for package owners.