Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions cmd/esbuild/service.go
Original file line number Diff line number Diff line change
Expand Up @@ -918,7 +918,7 @@ func (service *serviceType) convertPlugins(key int, jsPlugins interface{}, activ
}}, nil
}

func (service *serviceType) handleTransformRequest(id uint32, request map[string]interface{}) []byte {
func (*serviceType) handleTransformRequest(id uint32, request map[string]interface{}) []byte {
inputFS := request["inputFS"].(bool)
input := request["input"].(string)
flags := decodeStringArray(request["flags"].([]interface{}))
Expand Down Expand Up @@ -988,7 +988,7 @@ func (service *serviceType) handleTransformRequest(id uint32, request map[string
})
}

func (service *serviceType) handleFormatMessagesRequest(id uint32, request map[string]interface{}) []byte {
func (*serviceType) handleFormatMessagesRequest(id uint32, request map[string]interface{}) []byte {
msgs := decodeMessages(request["messages"].([]interface{}))

options := api.FormatMessagesOptions{
Expand All @@ -1014,7 +1014,7 @@ func (service *serviceType) handleFormatMessagesRequest(id uint32, request map[s
})
}

func (service *serviceType) handleAnalyzeMetafileRequest(id uint32, request map[string]interface{}) []byte {
func (*serviceType) handleAnalyzeMetafileRequest(id uint32, request map[string]interface{}) []byte {
metafile := request["metafile"].(string)

options := api.AnalyzeMetafileOptions{}
Expand Down
2 changes: 1 addition & 1 deletion internal/bundler/linker.go
Original file line number Diff line number Diff line change
Expand Up @@ -1126,7 +1126,7 @@ func (a crossChunkImportArray) Less(i int, j int) bool {
}

// Sort cross-chunk imports by chunk name for determinism
func (c *linkerContext) sortedCrossChunkImports(chunks []chunkInfo, importsFromOtherChunks map[uint32]crossChunkImportItemArray) crossChunkImportArray {
func (*linkerContext) sortedCrossChunkImports(chunks []chunkInfo, importsFromOtherChunks map[uint32]crossChunkImportItemArray) crossChunkImportArray {
result := make(crossChunkImportArray, 0, len(importsFromOtherChunks))

for otherChunkIndex, importItems := range importsFromOtherChunks {
Expand Down
2 changes: 1 addition & 1 deletion internal/css_ast/css_ast.go
Original file line number Diff line number Diff line change
Expand Up @@ -314,7 +314,7 @@ func (*RAtImport) Equal(rule R) bool {
return false
}

func (r *RAtImport) Hash() (uint32, bool) {
func (*RAtImport) Hash() (uint32, bool) {
return 0, false
}

Expand Down
2 changes: 1 addition & 1 deletion internal/css_parser/css_decls_font_weight.go
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ import (
"github.com/evanw/esbuild/internal/css_lexer"
)

func (p *parser) mangleFontWeight(token css_ast.Token) css_ast.Token {
func (*parser) mangleFontWeight(token css_ast.Token) css_ast.Token {
if token.Kind != css_lexer.TIdent {
return token
}
Expand Down
2 changes: 1 addition & 1 deletion internal/css_parser/css_decls_transform.go
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ func turnPercentIntoNumberIfShorter(t *css_ast.Token) {

// https://www.w3.org/TR/css-transforms-1/#two-d-transform-functions
// https://drafts.csswg.org/css-transforms-2/#transform-functions
func (p *parser) mangleTransforms(tokens []css_ast.Token) []css_ast.Token {
func (*parser) mangleTransforms(tokens []css_ast.Token) []css_ast.Token {
for i := range tokens {
if token := &tokens[i]; token.Kind == css_lexer.TFunction {
if args := *token.Children; css_ast.TokensAreCommaSeparated(args) {
Expand Down
2 changes: 1 addition & 1 deletion internal/fs/fs.go
Original file line number Diff line number Diff line change
Expand Up @@ -151,7 +151,7 @@ func (f *InMemoryOpenedFile) Read(start int, end int) ([]byte, error) {
return []byte(f.Contents[start:end]), nil
}

func (f *InMemoryOpenedFile) Close() error {
func (*InMemoryOpenedFile) Close() error {
return nil
}

Expand Down
6 changes: 3 additions & 3 deletions internal/fs/fs_mock.go
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,7 @@ func (fs *mockFS) OpenFile(path string) (OpenedFile, error, error) {
return nil, syscall.ENOENT, syscall.ENOENT
}

func (fs *mockFS) ModKey(path string) (ModKey, error) {
func (*mockFS) ModKey(path string) (ModKey, error) {
return ModKey{}, errors.New("This is not available during tests")
}

Expand Down Expand Up @@ -148,10 +148,10 @@ func (*mockFS) Rel(base string, target string) (string, bool) {
return commonParent + target, true
}

func (fs *mockFS) kind(dir string, base string) (symlink string, kind EntryKind) {
func (*mockFS) kind(dir string, base string) (symlink string, kind EntryKind) {
panic("This should never be called")
}

func (fs *mockFS) WatchData() WatchData {
func (*mockFS) WatchData() WatchData {
panic("This should never be called")
}
2 changes: 1 addition & 1 deletion internal/graph/input.go
Original file line number Diff line number Diff line change
Expand Up @@ -120,6 +120,6 @@ type CopyRepr struct {
URLForCode string
}

func (repr *CopyRepr) ImportRecords() *[]ast.ImportRecord {
func (*CopyRepr) ImportRecords() *[]ast.ImportRecord {
return nil
}
6 changes: 3 additions & 3 deletions internal/js_parser/js_parser.go
Original file line number Diff line number Diff line change
Expand Up @@ -8936,7 +8936,7 @@ func (p *parser) mangleIfExpr(loc logger.Loc, e *js_ast.EIf) js_ast.Expr {
return js_ast.Expr{Loc: loc, Data: e}
}

func (p *parser) isAnonymousNamedExpr(expr js_ast.Expr) bool {
func (*parser) isAnonymousNamedExpr(expr js_ast.Expr) bool {
switch e := expr.Data.(type) {
case *js_ast.EArrow:
return true
Expand Down Expand Up @@ -10053,7 +10053,7 @@ func (p *parser) maybeRelocateVarsToTopLevel(decls []js_ast.Decl, mode relocateV
return js_ast.Stmt{Loc: value.Loc, Data: &js_ast.SExpr{Value: value}}, true
}

func (p *parser) markExprAsParenthesized(value js_ast.Expr) {
func (*parser) markExprAsParenthesized(value js_ast.Expr) {
switch e := value.Data.(type) {
case *js_ast.EArray:
e.IsParenthesized = true
Expand Down Expand Up @@ -11568,7 +11568,7 @@ func (p *parser) isValidAssignmentTarget(expr js_ast.Expr) bool {
}

// "`a${'b'}c`" => "`abc`"
func (p *parser) mangleTemplate(loc logger.Loc, e *js_ast.ETemplate) js_ast.Expr {
func (*parser) mangleTemplate(loc logger.Loc, e *js_ast.ETemplate) js_ast.Expr {
// Can't inline strings if there's a custom template tag
if e.TagOrNil.Data == nil {
end := 0
Expand Down
2 changes: 1 addition & 1 deletion internal/js_parser/js_parser_lower.go
Original file line number Diff line number Diff line change
Expand Up @@ -777,7 +777,7 @@ flatten:
}
}

func (p *parser) lowerParenthesizedOptionalChain(loc logger.Loc, e *js_ast.ECall, childOut exprOut) js_ast.Expr {
func (*parser) lowerParenthesizedOptionalChain(loc logger.Loc, e *js_ast.ECall, childOut exprOut) js_ast.Expr {
return childOut.thisArgWrapFunc(js_ast.Expr{Loc: loc, Data: &js_ast.ECall{
Target: js_ast.Expr{Loc: loc, Data: &js_ast.EDot{
Target: e.Target,
Expand Down
2 changes: 1 addition & 1 deletion internal/js_parser/ts_parser.go
Original file line number Diff line number Diff line change
Expand Up @@ -1854,7 +1854,7 @@ func (p *parser) generateClosureForTypeScriptEnum(
return stmts
}

func (p *parser) wrapInlinedEnum(value js_ast.Expr, comment string) js_ast.Expr {
func (*parser) wrapInlinedEnum(value js_ast.Expr, comment string) js_ast.Expr {
if strings.Contains(comment, "*/") {
// Don't wrap with a comment
return value
Expand Down
4 changes: 2 additions & 2 deletions internal/xxhash/xxhash.go
Original file line number Diff line number Diff line change
Expand Up @@ -59,10 +59,10 @@ func (d *Digest) Reset() {
}

// Size always returns 8 bytes.
func (d *Digest) Size() int { return 8 }
func (*Digest) Size() int { return 8 }

// BlockSize always returns 32 bytes.
func (d *Digest) BlockSize() int { return 32 }
func (*Digest) BlockSize() int { return 32 }

// Write adds more data to d. It always returns len(b), nil.
func (d *Digest) Write(b []byte) (n int, err error) {
Expand Down