Skip to content

Commit fe0510d

Browse files
committed
Rename gopherjs:keep_overridden to gopherjs:keep-original
... as per gopherjs#798 (comment)
1 parent 06d6901 commit fe0510d

File tree

2 files changed

+4
-4
lines changed

2 files changed

+4
-4
lines changed

build/build.go

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -117,7 +117,7 @@ func ImportDir(dir string, mode build.ImportMode, installSuffix string, buildTag
117117
return pkg, nil
118118
}
119119

120-
// Test if we find the '//gopherjs:keep_overridden' comment
120+
// Test if we find the '//gopherjs:keep-original' comment
121121
func findKeepOverriddenComment(doc *ast.CommentGroup) bool {
122122
if doc == nil {
123123
return false
@@ -127,7 +127,7 @@ func findKeepOverriddenComment(doc *ast.CommentGroup) bool {
127127
if i := strings.Index(text, " "); i >= 0 {
128128
text = text[:i]
129129
}
130-
if text == "//gopherjs:keep_overridden" {
130+
if text == "//gopherjs:keep-original" {
131131
return true
132132
}
133133
}
@@ -144,7 +144,7 @@ func findKeepOverriddenComment(doc *ast.CommentGroup) bool {
144144
// native overrides get added to the package (even if they have the same name
145145
// as an existing file from the standard library). For function identifiers that exist
146146
// in the original AND the overrides AND that include the following directive in their comment:
147-
// //gopherjs:keep_overridden, the original identifier in the AST gets prefixed by
147+
// //gopherjs:keep-original, the original identifier in the AST gets prefixed by
148148
// `_gopherjs_overridden_`. For other identifiers that exist in the original AND the overrides,
149149
// the original identifier gets replaced by `_`. New identifiers that don't exist in original
150150
// package get added.

compiler/natives/src/regexp/regexp_test.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ import (
77
"testing"
88
)
99

10-
//gopherjs:keep_overridden
10+
//gopherjs:keep-original
1111
func TestOnePassCutoff(t *testing.T) {
1212
defer func() {
1313
if r := recover(); r != nil {

0 commit comments

Comments
 (0)