package logger
Import Path
github.com/evanw/esbuild/internal/logger (on go.dev )
Dependency Relation
imports 9 packages , and imported by 14 packages
Package-Level Type Names (total 19, all are exported)
/* sort exporteds by: alphabet | popularity */
type Loc (struct)
Fields (only one, which is exported )
Start int32
This is the 0-based index of this location from the start of the file, in bytes
As Outputs Of (at least 4, in which 1 are exported )
func github.com/evanw/esbuild/internal/js_lexer.(*Lexer ).Loc () Loc
/* 3+ unexporteds ... */ /* 3+ unexporteds: */
func github.com/evanw/esbuild/internal/js_parser.fnBodyContainsUseStrict (body []js_ast .Stmt ) (Loc , bool )
func github.com/evanw/esbuild/internal/js_parser.locAfterOp (e *js_ast .EBinary ) Loc
func github.com/evanw/esbuild/internal/resolver.getProperty (json js_ast .Expr , name string ) (js_ast .Expr , Loc , bool )
As Inputs Of (at least 15, in which 9 are exported )
func Log .AddError (source *Source , loc Loc , text string )
func Log .AddErrorWithNotes (source *Source , loc Loc , text string , notes []MsgData )
func Log .AddWarning (source *Source , loc Loc , text string )
func (*Source ).RangeOfLegacyOctalEscape (loc Loc ) (r Range )
func (*Source ).RangeOfNumber (loc Loc ) (r Range )
func (*Source ).RangeOfOperatorAfter (loc Loc , op string ) Range
func (*Source ).RangeOfOperatorBefore (loc Loc , op string ) Range
func (*Source ).RangeOfString (loc Loc ) Range
func github.com/evanw/esbuild/internal/js_lexer.RangeOfIdentifier (source Source , loc Loc ) Range
/* 6+ unexporteds ... */ /* 6+ unexporteds: */
func github.com/evanw/esbuild/internal/js_lexer.(*Lexer ).addError (loc Loc , text string )
func github.com/evanw/esbuild/internal/js_lexer.(*Lexer ).addErrorWithNotes (loc Loc , text string , notes []MsgData )
func github.com/evanw/esbuild/internal/js_parser.stmtsToSingleStmt (loc Loc , stmts []js_ast .Stmt ) js_ast .Stmt
func github.com/evanw/esbuild/internal/resolver.isValidTSConfigPathNoBaseURLPattern (text string , log Log , source Source , loc Loc ) bool
func github.com/evanw/esbuild/internal/resolver.isValidTSConfigPathPattern (text string , log Log , source Source , loc Loc ) bool
func github.com/evanw/esbuild/internal/resolver.parseMemberExpressionForJSX (log Log , source Source , loc Loc , text string ) []string
type Log (struct)
Fields (total 4, all are exported )
AddMsg func(Msg )
AlmostDone func()
This is called after the build has finished but before writing to stdout.
It exists to ensure that deferred warning messages end up in the terminal
before the data written to stdout.
Done func() []Msg
HasErrors func() bool
Methods (total 7, all are exported )
( T) AddError (source *Source , loc Loc , text string )
( T) AddErrorWithNotes (source *Source , loc Loc , text string , notes []MsgData )
( T) AddRangeError (source *Source , r Range , text string )
( T) AddRangeErrorWithNotes (source *Source , r Range , text string , notes []MsgData )
( T) AddRangeWarning (source *Source , r Range , text string )
( T) AddRangeWarningWithNotes (source *Source , r Range , text string , notes []MsgData )
( T) AddWarning (source *Source , loc Loc , text string )
As Outputs Of (at least 2, both are exported )
func NewDeferLog () Log
func NewStderrLog (options OutputOptions ) Log
As Inputs Of (at least 37, in which 17 are exported )
func github.com/evanw/esbuild/internal/bundler.ScanBundle (log Log , fs fs .FS , res resolver .Resolver , caches *cache .CacheSet , entryPoints []string , options config .Options ) bundler .Bundle
func github.com/evanw/esbuild/internal/bundler.(*Bundle ).Compile (log Log , options config .Options ) []bundler .OutputFile
func github.com/evanw/esbuild/internal/cache.(*CSSCache ).Parse (log Log , source Source , options css_parser .Options ) css_ast .AST
func github.com/evanw/esbuild/internal/cache.(*JSCache ).Parse (log Log , source Source , options js_parser .Options ) (js_ast .AST , bool )
func github.com/evanw/esbuild/internal/cache.(*JSONCache ).Parse (log Log , source Source , options js_parser .JSONOptions ) (js_ast .Expr , bool )
func github.com/evanw/esbuild/internal/css_lexer.Tokenize (log Log , source Source ) (tokens []css_lexer .Token )
func github.com/evanw/esbuild/internal/css_parser.Parse (log Log , source Source , options css_parser .Options ) css_ast .AST
func github.com/evanw/esbuild/internal/js_lexer.NewLexer (log Log , source Source ) js_lexer .Lexer
func github.com/evanw/esbuild/internal/js_lexer.NewLexerGlobalName (log Log , source Source ) js_lexer .Lexer
func github.com/evanw/esbuild/internal/js_lexer.NewLexerJSON (log Log , source Source , allowComments bool ) js_lexer .Lexer
func github.com/evanw/esbuild/internal/js_parser.LazyExportAST (log Log , source Source , options js_parser .Options , expr js_ast .Expr , apiCall string ) js_ast .AST
func github.com/evanw/esbuild/internal/js_parser.Parse (log Log , source Source , options js_parser .Options ) (result js_ast .AST , ok bool )
func github.com/evanw/esbuild/internal/js_parser.ParseGlobalName (log Log , source Source ) (result []string , ok bool )
func github.com/evanw/esbuild/internal/js_parser.ParseJSON (log Log , source Source , options js_parser .JSONOptions ) (result js_ast .Expr , ok bool )
func github.com/evanw/esbuild/internal/js_parser.ParseSourceMap (log Log , source Source ) *sourcemap .SourceMap
func github.com/evanw/esbuild/internal/resolver.NewResolver (fs fs .FS , log Log , caches *cache .CacheSet , options config .Options ) resolver .Resolver
func github.com/evanw/esbuild/internal/resolver.ParseTSConfigJSON (log Log , source Source , jsonCache *cache .JSONCache , extends func(string , Range ) *resolver .TSConfigJSON ) *resolver .TSConfigJSON
/* 20+ unexporteds ... */ /* 20+ unexporteds: */
func github.com/evanw/esbuild/internal/bundler.extractSourceMapFromComment (log Log , fs fs .FS , fsCache *cache .FSCache , res resolver .Resolver , source *Source , comment js_ast .Span , absResolveDir string ) (Path , *string )
func github.com/evanw/esbuild/internal/bundler.logPluginMessages (res resolver .Resolver , log Log , name string , msgs []Msg , thrown error , importSource *Source , importPathRange Range ) bool
func github.com/evanw/esbuild/internal/bundler.newLinkerContext (options *config .Options , log Log , fs fs .FS , res resolver .Resolver , files []bundler .file , entryPoints []uint32 , reachableFiles []uint32 , dataForSourceMaps func() []bundler .dataForSourceMap ) bundler .linkerContext
func github.com/evanw/esbuild/internal/bundler.runOnLoadPlugins (plugins []config .Plugin , res resolver .Resolver , fs fs .FS , fsCache *cache .FSCache , log Log , source *Source , importSource *Source , importPathRange Range , pluginData interface{}, isWatchMode bool ) (bundler .loaderPluginResult , bool )
func github.com/evanw/esbuild/internal/bundler.runOnResolvePlugins (plugins []config .Plugin , res resolver .Resolver , log Log , fs fs .FS , importSource *Source , importPathRange Range , path string , kind ast .ImportKind , absResolveDir string , pluginData interface{}) (*resolver .ResolveResult , bool )
func github.com/evanw/esbuild/internal/js_parser.newParser (log Log , source Source , lexer js_lexer .Lexer , options *js_parser .Options ) *js_parser .parser
func github.com/evanw/esbuild/internal/resolver.isValidTSConfigPathNoBaseURLPattern (text string , log Log , source Source , loc Loc ) bool
func github.com/evanw/esbuild/internal/resolver.isValidTSConfigPathPattern (text string , log Log , source Source , loc Loc ) bool
func github.com/evanw/esbuild/internal/resolver.parseMemberExpressionForJSX (log Log , source Source , loc Loc , text string ) []string
func github.com/evanw/esbuild/pkg/api.loadPlugins (fs fs .FS , log Log , plugins []api .Plugin ) (results []config .Plugin )
func github.com/evanw/esbuild/pkg/api.rebuildImpl (buildOpts api .BuildOptions , caches *cache .CacheSet , plugins []config .Plugin , logOptions OutputOptions , log Log , isRebuild bool ) api .internalBuildResult
func github.com/evanw/esbuild/pkg/api.validateDefines (log Log , defines map[string ]string , pureFns []string ) (*config .ProcessedDefines , []config .InjectedDefine )
func github.com/evanw/esbuild/pkg/api.validateExternals (log Log , fs fs .FS , paths []string ) config .ExternalModules
func github.com/evanw/esbuild/pkg/api.validateFeatures (log Log , target api .Target , engines []api .Engine ) (compat .JSFeature , compat .CSSFeature )
func github.com/evanw/esbuild/pkg/api.validateGlobalName (log Log , text string ) []string
func github.com/evanw/esbuild/pkg/api.validateJSX (log Log , text string , name string ) []string
func github.com/evanw/esbuild/pkg/api.validateLoaders (log Log , loaders map[string ]api .Loader ) map[string ]config .Loader
func github.com/evanw/esbuild/pkg/api.validateOutputExtensions (log Log , outExtensions map[string ]string ) (js string , css string )
func github.com/evanw/esbuild/pkg/api.validatePath (log Log , fs fs .FS , relPath string , pathKind string ) string
func github.com/evanw/esbuild/pkg/api.validateResolveExtensions (log Log , order []string ) []string
type Msg (struct)
Fields (total 3, all are exported )
Data MsgData
Kind MsgKind
Notes []MsgData
Methods (only one, which is exported )
( T) String (options OutputOptions , terminalInfo TerminalInfo ) string
As Outputs Of (at least one unexported )
/* at least one unexported ... */ /* at least one unexported: */
func github.com/evanw/esbuild/pkg/api.convertMessagesToInternal (msgs []Msg , kind MsgKind , messages []api .Message ) []Msg
As Inputs Of (at least 4, in which 1 are exported )
func PrintMessageToStderr (osArgs []string , msg Msg )
/* 3+ unexporteds ... */ /* 3+ unexporteds: */
func github.com/evanw/esbuild/internal/bundler.logPluginMessages (res resolver .Resolver , log Log , name string , msgs []Msg , thrown error , importSource *Source , importPathRange Range ) bool
func github.com/evanw/esbuild/pkg/api.convertMessagesToInternal (msgs []Msg , kind MsgKind , messages []api .Message ) []Msg
func github.com/evanw/esbuild/pkg/api.convertMessagesToPublic (kind MsgKind , msgs []Msg ) []api .Message
type MsgData (struct)
Fields (total 3, all are exported )
Location *MsgLocation
Text string
UserDetail interface{}
Optional user-specified data that is passed through unmodified
As Outputs Of (at least one exported )
func RangeData (source *Source , r Range , text string ) MsgData
As Inputs Of (at least 6, in which 3 are exported )
func Log .AddErrorWithNotes (source *Source , loc Loc , text string , notes []MsgData )
func Log .AddRangeErrorWithNotes (source *Source , r Range , text string , notes []MsgData )
func Log .AddRangeWarningWithNotes (source *Source , r Range , text string , notes []MsgData )
/* 3+ unexporteds ... */ /* 3+ unexporteds: */
func detailStruct (data MsgData , terminalInfo TerminalInfo , maxMargin int ) MsgDetail
func msgString (options OutputOptions , terminalInfo TerminalInfo , kind MsgKind , data MsgData , maxMargin int ) string
func github.com/evanw/esbuild/internal/js_lexer.(*Lexer ).addErrorWithNotes (loc Loc , text string , notes []MsgData )
type MsgKind uint8 (basic type)
Methods (only one, which is exported )
( T) String () string
Implements (at least 4, in which 2 are exported )
T : expvar.Var
T : fmt.Stringer
/* 2+ unexporteds ... */ /* 2+ unexporteds: */
T : context.stringer
T : runtime.stringer
As Inputs Of (at least 3, none are exported )
/* 3+ unexporteds ... */ /* 3+ unexporteds: */
func msgString (options OutputOptions , terminalInfo TerminalInfo , kind MsgKind , data MsgData , maxMargin int ) string
func github.com/evanw/esbuild/pkg/api.convertMessagesToInternal (msgs []Msg , kind MsgKind , messages []api .Message ) []Msg
func github.com/evanw/esbuild/pkg/api.convertMessagesToPublic (kind MsgKind , msgs []Msg ) []api .Message
As Types Of (total 3, all are exported )
const Error
const Note
const Warning
type OutputOptions (struct)
Fields (total 4, all are exported )
Color UseColor
IncludeSource bool
LogLevel LogLevel
MessageLimit int
As Outputs Of (at least one exported )
func OutputOptionsForArgs (osArgs []string ) OutputOptions
As Inputs Of (at least 4, in which 2 are exported )
func NewStderrLog (options OutputOptions ) Log
func Msg .String (options OutputOptions , terminalInfo TerminalInfo ) string
/* 2+ unexporteds ... */ /* 2+ unexporteds: */
func msgString (options OutputOptions , terminalInfo TerminalInfo , kind MsgKind , data MsgData , maxMargin int ) string
func github.com/evanw/esbuild/pkg/api.rebuildImpl (buildOpts api .BuildOptions , caches *cache .CacheSet , plugins []config .Plugin , logOptions OutputOptions , log Log , isRebuild bool ) api .internalBuildResult
type Path (struct)
This is used to represent both file system paths (Namespace == "file") and
abstract module paths (Namespace != "file"). Abstract module paths represent
"virtual modules" when used for an input file and "package paths" when used
to represent an external module.
Fields (total 4, all are exported )
Flags PathFlags
IgnoredSuffix string
This feature was added to support ancient CSS libraries that append things
like "?#iefix" and "#icons" to some of their import paths as a hack for IE6.
The intent is for these suffix parts to be ignored but passed through to
the output. This is supported by other bundlers, so we also support this.
Namespace string
Text string
Methods (total 2, both are exported )
( T) ComesBeforeInSortedOrder (b Path ) bool
( T) IsDisabled () bool
As Outputs Of (at least 2, neither is exported )
/* 2+ unexporteds ... */ /* 2+ unexporteds: */
func github.com/evanw/esbuild/internal/bundler.extractSourceMapFromComment (log Log , fs fs .FS , fsCache *cache .FSCache , res resolver .Resolver , source *Source , comment js_ast .Span , absResolveDir string ) (Path , *string )
func github.com/evanw/esbuild/internal/resolver.(*PathPair ).iter () []*Path
As Inputs Of (at least 4, all are exported )
func Path.ComesBeforeInSortedOrder (b Path ) bool
func github.com/evanw/esbuild/internal/cache.(*SourceIndexCache ).Get (path Path , kind cache .SourceIndexKind ) uint32
func github.com/evanw/esbuild/internal/config.PluginAppliesToPath (path Path , filter *regexp .Regexp , namespace string ) bool
func github.com/evanw/esbuild/internal/resolver.Resolver .PrettyPath (path Path ) string
type Range (struct)
Fields (total 2, both are exported )
Len int32
Loc Loc
Methods (only one, which is exported )
( T) End () int32
As Outputs Of (at least 7, all are exported )
func (*Source ).RangeOfLegacyOctalEscape (loc Loc ) (r Range )
func (*Source ).RangeOfNumber (loc Loc ) (r Range )
func (*Source ).RangeOfOperatorAfter (loc Loc , op string ) Range
func (*Source ).RangeOfOperatorBefore (loc Loc , op string ) Range
func (*Source ).RangeOfString (loc Loc ) Range
func github.com/evanw/esbuild/internal/js_lexer.RangeOfIdentifier (source Source , loc Loc ) Range
func github.com/evanw/esbuild/internal/js_lexer.(*Lexer ).Range () Range
As Inputs Of (at least 11, in which 7 are exported )
func LocationOrNil (source *Source , r Range ) *MsgLocation
func RangeData (source *Source , r Range , text string ) MsgData
func Log .AddRangeError (source *Source , r Range , text string )
func Log .AddRangeErrorWithNotes (source *Source , r Range , text string , notes []MsgData )
func Log .AddRangeWarning (source *Source , r Range , text string )
func Log .AddRangeWarningWithNotes (source *Source , r Range , text string , notes []MsgData )
func (*Source ).TextForRange (r Range ) string
/* 4+ unexporteds ... */ /* 4+ unexporteds: */
func github.com/evanw/esbuild/internal/bundler.logPluginMessages (res resolver .Resolver , log Log , name string , msgs []Msg , thrown error , importSource *Source , importPathRange Range ) bool
func github.com/evanw/esbuild/internal/bundler.runOnLoadPlugins (plugins []config .Plugin , res resolver .Resolver , fs fs .FS , fsCache *cache .FSCache , log Log , source *Source , importSource *Source , importPathRange Range , pluginData interface{}, isWatchMode bool ) (bundler .loaderPluginResult , bool )
func github.com/evanw/esbuild/internal/bundler.runOnResolvePlugins (plugins []config .Plugin , res resolver .Resolver , log Log , fs fs .FS , importSource *Source , importPathRange Range , path string , kind ast .ImportKind , absResolveDir string , pluginData interface{}) (*resolver .ResolveResult , bool )
func github.com/evanw/esbuild/internal/js_lexer.(*Lexer ).addRangeError (r Range , text string )
type Source (struct)
Fields (total 5, all are exported )
Contents string
IdentifierName string
An identifier that is mixed in to automatically-generated symbol names to
improve readability. For example, if the identifier is "util" then the
symbol for an "export default" statement will be called "util_default".
Index uint32
KeyPath Path
This is used as a unique key to identify this source file. It should never
be shown to the user (e.g. never print this to the terminal).
If it's marked as an absolute path, it's a platform-dependent path that
includes environment-specific things such as Windows backslash path
separators and potentially the user's home directory. Only use this for
passing to syscalls for reading and writing to the file system. Do not
include this in any output data.
If it's marked as not an absolute path, it's an opaque string that is used
to refer to an automatically-generated module.
PrettyPath string
This is used for error messages and the metadata JSON file.
This is a mostly platform-independent path. It's relative to the current
working directory and always uses standard path separators. Use this for
referencing a file in all output data. These paths still use the original
case of the path so they may still work differently on file systems that
are case-insensitive vs. case-sensitive.
Methods (total 6, all are exported )
(*T) RangeOfLegacyOctalEscape (loc Loc ) (r Range )
(*T) RangeOfNumber (loc Loc ) (r Range )
(*T) RangeOfOperatorAfter (loc Loc , op string ) Range
(*T) RangeOfOperatorBefore (loc Loc , op string ) Range
(*T) RangeOfString (loc Loc ) Range
(*T) TextForRange (r Range ) string
As Inputs Of (at least 33, in which 24 are exported )
func LocationOrNil (source *Source , r Range ) *MsgLocation
func RangeData (source *Source , r Range , text string ) MsgData
func Log .AddError (source *Source , loc Loc , text string )
func Log .AddErrorWithNotes (source *Source , loc Loc , text string , notes []MsgData )
func Log .AddRangeError (source *Source , r Range , text string )
func Log .AddRangeErrorWithNotes (source *Source , r Range , text string , notes []MsgData )
func Log .AddRangeWarning (source *Source , r Range , text string )
func Log .AddRangeWarningWithNotes (source *Source , r Range , text string , notes []MsgData )
func Log .AddWarning (source *Source , loc Loc , text string )
func github.com/evanw/esbuild/internal/cache.(*CSSCache ).Parse (log Log , source Source , options css_parser .Options ) css_ast .AST
func github.com/evanw/esbuild/internal/cache.(*JSCache ).Parse (log Log , source Source , options js_parser .Options ) (js_ast .AST , bool )
func github.com/evanw/esbuild/internal/cache.(*JSONCache ).Parse (log Log , source Source , options js_parser .JSONOptions ) (js_ast .Expr , bool )
func github.com/evanw/esbuild/internal/css_lexer.Tokenize (log Log , source Source ) (tokens []css_lexer .Token )
func github.com/evanw/esbuild/internal/css_parser.Parse (log Log , source Source , options css_parser .Options ) css_ast .AST
func github.com/evanw/esbuild/internal/js_lexer.NewLexer (log Log , source Source ) js_lexer .Lexer
func github.com/evanw/esbuild/internal/js_lexer.NewLexerGlobalName (log Log , source Source ) js_lexer .Lexer
func github.com/evanw/esbuild/internal/js_lexer.NewLexerJSON (log Log , source Source , allowComments bool ) js_lexer .Lexer
func github.com/evanw/esbuild/internal/js_lexer.RangeOfIdentifier (source Source , loc Loc ) Range
func github.com/evanw/esbuild/internal/js_parser.LazyExportAST (log Log , source Source , options js_parser .Options , expr js_ast .Expr , apiCall string ) js_ast .AST
func github.com/evanw/esbuild/internal/js_parser.Parse (log Log , source Source , options js_parser .Options ) (result js_ast .AST , ok bool )
func github.com/evanw/esbuild/internal/js_parser.ParseGlobalName (log Log , source Source ) (result []string , ok bool )
func github.com/evanw/esbuild/internal/js_parser.ParseJSON (log Log , source Source , options js_parser .JSONOptions ) (result js_ast .Expr , ok bool )
func github.com/evanw/esbuild/internal/js_parser.ParseSourceMap (log Log , source Source ) *sourcemap .SourceMap
func github.com/evanw/esbuild/internal/resolver.ParseTSConfigJSON (log Log , source Source , jsonCache *cache .JSONCache , extends func(string , Range ) *resolver .TSConfigJSON ) *resolver .TSConfigJSON
/* 9+ unexporteds ... */ /* 9+ unexporteds: */
func github.com/evanw/esbuild/internal/bundler.extractSourceMapFromComment (log Log , fs fs .FS , fsCache *cache .FSCache , res resolver .Resolver , source *Source , comment js_ast .Span , absResolveDir string ) (Path , *string )
func github.com/evanw/esbuild/internal/bundler.logPluginMessages (res resolver .Resolver , log Log , name string , msgs []Msg , thrown error , importSource *Source , importPathRange Range ) bool
func github.com/evanw/esbuild/internal/bundler.runOnLoadPlugins (plugins []config .Plugin , res resolver .Resolver , fs fs .FS , fsCache *cache .FSCache , log Log , source *Source , importSource *Source , importPathRange Range , pluginData interface{}, isWatchMode bool ) (bundler .loaderPluginResult , bool )
func github.com/evanw/esbuild/internal/bundler.runOnLoadPlugins (plugins []config .Plugin , res resolver .Resolver , fs fs .FS , fsCache *cache .FSCache , log Log , source *Source , importSource *Source , importPathRange Range , pluginData interface{}, isWatchMode bool ) (bundler .loaderPluginResult , bool )
func github.com/evanw/esbuild/internal/bundler.runOnResolvePlugins (plugins []config .Plugin , res resolver .Resolver , log Log , fs fs .FS , importSource *Source , importPathRange Range , path string , kind ast .ImportKind , absResolveDir string , pluginData interface{}) (*resolver .ResolveResult , bool )
func github.com/evanw/esbuild/internal/js_parser.newParser (log Log , source Source , lexer js_lexer .Lexer , options *js_parser .Options ) *js_parser .parser
func github.com/evanw/esbuild/internal/resolver.isValidTSConfigPathNoBaseURLPattern (text string , log Log , source Source , loc Loc ) bool
func github.com/evanw/esbuild/internal/resolver.isValidTSConfigPathPattern (text string , log Log , source Source , loc Loc ) bool
func github.com/evanw/esbuild/internal/resolver.parseMemberExpressionForJSX (log Log , source Source , loc Loc , text string ) []string
As Types Of (total 2, both are exported )
var github.com/evanw/esbuild/internal/runtime.ES5Source
var github.com/evanw/esbuild/internal/runtime.ES6Source
The pages are generated with Golds v0.3.2-preview . (GOOS=darwin GOARCH=amd64)
Golds is a Go 101 project developed by Tapir Liu .
PR and bug reports are welcome and can be submitted to the issue list .
Please follow @Go100and1 (reachable from the left QR code) to get the latest news of Golds .