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

Commit0aede16

Browse files
committed
playground/internal/imports: add syscall/js identifiers
GopherJS 1.12-2 has added support for syscall/js package,so it should be available as part of imports.The syscall/js API is not included in the GOROOT/api/go1.*.txt filesat this time, and so it needs to be added to mkstdlib.go explicitly.Use the mkapi.go program to determine the syscall/js API.Regenerate zstdlib.go with the updated generator, using Go 1.12.13:go1.12.13 generate github.com/gopherjs/gopherjs.github.io/playground/internal/importsUpdatesgolang/go#27590
1 parent353fe54 commit0aede16

File tree

3 files changed

+726
-702
lines changed

3 files changed

+726
-702
lines changed

‎playground/internal/imports/gen.go‎

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
1+
//go:generate go run mkapi.go -output=syscalljs.txt -contexts js-wasm syscall/js
12
//go:generate go run mkapi.go -output=gopherjs.txt -gopath github.com/gopherjs/gopherjs/js
23
//go:generate go run mkstdlib.go -output=zstdlib
3-
//go:generate rm gopherjs.txt
4+
//go:generate rmsyscalljs.txtgopherjs.txt
45

56
package imports

‎playground/internal/imports/mkstdlib.go‎

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -69,6 +69,11 @@ func main() {
6969
mustOpen(api("go1.10.txt")),
7070
mustOpen(api("go1.11.txt")),
7171
mustOpen(api("go1.12.txt")),
72+
73+
// The API of the syscall/js package needs to be computed explicitly,
74+
// because it's not included in the GOROOT/api/go1.*.txt files at this time.
75+
mustOpen("syscalljs.txt"),
76+
7277
mustOpen("gopherjs.txt"),
7378
)
7479
sc:=bufio.NewScanner(f)

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp