Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commitaf6421d

Browse files
committed
Make Playground compatible with GopherJS 1.18.x
1 parent81278eb commitaf6421d

File tree

2 files changed

+100
-89
lines changed

2 files changed

+100
-89
lines changed

‎playground/playground.go‎

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -174,13 +174,19 @@ func main() {
174174
}
175175

176176
data:=js.Global.Get("Uint8Array").New(req.Response).Interface().([]byte)
177-
packages[path],err=compiler.ReadArchive(path+".a",path,bytes.NewReader(data),importContext.Packages)
177+
packages[path],err=compiler.ReadArchive(path+".a",bytes.NewReader(data))
178178
iferr!=nil {
179179
scope.Apply(func() {
180180
scope.Set("output", []Line{Line{"type":"err","content":err.Error()}})
181181
})
182182
return
183183
}
184+
iferr:=packages[path].RegisterTypes(importContext.Packages);err!=nil {
185+
scope.Apply(func() {
186+
scope.Set("output", []Line{Line{"type":"err","content":err.Error()}})
187+
})
188+
return
189+
}
184190
pkgsReceived++
185191
ifpkgsReceived==len(pkgsToLoad) {
186192
run(loadOnly)

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp