Skip to content

Commit 06d6901

Browse files
r-l-xflimzy
authored andcommitted
fixed typo
1 parent 9d91789 commit 06d6901

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

build/build.go

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -118,7 +118,7 @@ func ImportDir(dir string, mode build.ImportMode, installSuffix string, buildTag
118118
}
119119

120120
// Test if we find the '//gopherjs:keep_overridden' comment
121-
func findKeepOverridenComment(doc *ast.CommentGroup) bool {
121+
func findKeepOverriddenComment(doc *ast.CommentGroup) bool {
122122
if doc == nil {
123123
return false
124124
}
@@ -152,7 +152,7 @@ func parseAndAugment(xctx XContext, pkg *PackageData, isTest bool, fileSet *toke
152152
var files []*ast.File
153153

154154
type overrideInfo struct {
155-
keepOverriden bool
155+
keepOverridden bool
156156
}
157157
replacedDeclNames := make(map[string]overrideInfo)
158158
pruneOriginalFuncs := make(map[string]bool)
@@ -194,7 +194,7 @@ func parseAndAugment(xctx XContext, pkg *PackageData, isTest bool, fileSet *toke
194194
switch d := decl.(type) {
195195
case *ast.FuncDecl:
196196
k := astutil.FuncKey(d)
197-
replacedDeclNames[k] = overrideInfo{keepOverriden: findKeepOverridenComment(d.Doc)}
197+
replacedDeclNames[k] = overrideInfo{keepOverridden: findKeepOverriddenComment(d.Doc)}
198198
pruneOriginalFuncs[k] = astutil.PruneOriginal(d)
199199
case *ast.GenDecl:
200200
switch d.Tok {
@@ -264,7 +264,7 @@ func parseAndAugment(xctx XContext, pkg *PackageData, isTest bool, fileSet *toke
264264
// GopherJS and pin unwanted imports.
265265
d.Body = nil
266266
}
267-
if info.keepOverriden {
267+
if info.keepOverridden {
268268
// Allow overridden function calls
269269
// The standard library implementation of foo() becomes _gopherjs_overridden_foo()
270270
d.Name.Name = "_gopherjs_overridden_" + d.Name.Name

0 commit comments

Comments
 (0)