unrecognized import path “syscall/js”
I am trying to use webassembly but I can't run this
import (
"syscall/js"
)
or
GOARCH=wasm GOOS=js go get -u github.com/siongui/godom/wasm
to install wasm
It throws me an error
cannot find package "syscall/js" in any of:
I am using go version go1.6.2 linux
go import importerror
add a comment |
I am trying to use webassembly but I can't run this
import (
"syscall/js"
)
or
GOARCH=wasm GOOS=js go get -u github.com/siongui/godom/wasm
to install wasm
It throws me an error
cannot find package "syscall/js" in any of:
I am using go version go1.6.2 linux
go import importerror
add a comment |
I am trying to use webassembly but I can't run this
import (
"syscall/js"
)
or
GOARCH=wasm GOOS=js go get -u github.com/siongui/godom/wasm
to install wasm
It throws me an error
cannot find package "syscall/js" in any of:
I am using go version go1.6.2 linux
go import importerror
I am trying to use webassembly but I can't run this
import (
"syscall/js"
)
or
GOARCH=wasm GOOS=js go get -u github.com/siongui/godom/wasm
to install wasm
It throws me an error
cannot find package "syscall/js" in any of:
I am using go version go1.6.2 linux
go import importerror
go import importerror
edited Nov 26 '18 at 6:34
Flimzy
39.3k106698
39.3k106698
asked Nov 26 '18 at 0:27
developerdeveloper
62
62
add a comment |
add a comment |
2 Answers
2
active
oldest
votes
Go 1.11 Release Notes (August 2018)
WebAssembly
Go programs can call into JavaScript using the new experimental
syscall/js
package.
syscall/js
was first introduced in Go1.11 (August 2018). Your output from the command go version
is go1.6.2 l
, an ancient (February 2016) and obsolete version.
After downloading a binary release of Go1.11 or later suitable for your system from Go Downloads, please follow the installation instructions, including the instructions for Uninstalling Go for your current version of Go.
add a comment |
There are some breaking changes in Go1.12 in syscall/js
The
Callback
type andNewCallback
function have been renamed; they are now calledFunc
andFuncOf
, respectively. This is a breaking change, but WebAssembly support is still experimental and not yet subject to the Go 1 compatibility promise. Any code using the old names will need to be updated.
If a type implements the new Wrapper interface,
ValueOf
will use it to return the JavaScript value for that type.
The meaning of the zero
Value
has changed. It now represents the JavaScript undefined value instead of the number zero. This is a breaking change, but WebAssembly support is still experimental and not yet subject to the Go 1 compatibility promise. Any code relying on the zero Value to mean the number zero will need to be updated.
The new
Value.Truthy
method reports the JavaScript "truthiness" of a given value.
Here is a link to an example that uses React, Node and Go to get a clearer understanding.
https://github.com/phmatray/webassembly-demo
add a comment |
Your Answer
StackExchange.ifUsing("editor", function () {
StackExchange.using("externalEditor", function () {
StackExchange.using("snippets", function () {
StackExchange.snippets.init();
});
});
}, "code-snippets");
StackExchange.ready(function() {
var channelOptions = {
tags: "".split(" "),
id: "1"
};
initTagRenderer("".split(" "), "".split(" "), channelOptions);
StackExchange.using("externalEditor", function() {
// Have to fire editor after snippets, if snippets enabled
if (StackExchange.settings.snippets.snippetsEnabled) {
StackExchange.using("snippets", function() {
createEditor();
});
}
else {
createEditor();
}
});
function createEditor() {
StackExchange.prepareEditor({
heartbeatType: 'answer',
autoActivateHeartbeat: false,
convertImagesToLinks: true,
noModals: true,
showLowRepImageUploadWarning: true,
reputationToPostImages: 10,
bindNavPrevention: true,
postfix: "",
imageUploader: {
brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
allowUrls: true
},
onDemand: true,
discardSelector: ".discard-answer"
,immediatelyShowMarkdownHelp:true
});
}
});
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
StackExchange.ready(
function () {
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f53473392%2funrecognized-import-path-syscall-js%23new-answer', 'question_page');
}
);
Post as a guest
Required, but never shown
2 Answers
2
active
oldest
votes
2 Answers
2
active
oldest
votes
active
oldest
votes
active
oldest
votes
Go 1.11 Release Notes (August 2018)
WebAssembly
Go programs can call into JavaScript using the new experimental
syscall/js
package.
syscall/js
was first introduced in Go1.11 (August 2018). Your output from the command go version
is go1.6.2 l
, an ancient (February 2016) and obsolete version.
After downloading a binary release of Go1.11 or later suitable for your system from Go Downloads, please follow the installation instructions, including the instructions for Uninstalling Go for your current version of Go.
add a comment |
Go 1.11 Release Notes (August 2018)
WebAssembly
Go programs can call into JavaScript using the new experimental
syscall/js
package.
syscall/js
was first introduced in Go1.11 (August 2018). Your output from the command go version
is go1.6.2 l
, an ancient (February 2016) and obsolete version.
After downloading a binary release of Go1.11 or later suitable for your system from Go Downloads, please follow the installation instructions, including the instructions for Uninstalling Go for your current version of Go.
add a comment |
Go 1.11 Release Notes (August 2018)
WebAssembly
Go programs can call into JavaScript using the new experimental
syscall/js
package.
syscall/js
was first introduced in Go1.11 (August 2018). Your output from the command go version
is go1.6.2 l
, an ancient (February 2016) and obsolete version.
After downloading a binary release of Go1.11 or later suitable for your system from Go Downloads, please follow the installation instructions, including the instructions for Uninstalling Go for your current version of Go.
Go 1.11 Release Notes (August 2018)
WebAssembly
Go programs can call into JavaScript using the new experimental
syscall/js
package.
syscall/js
was first introduced in Go1.11 (August 2018). Your output from the command go version
is go1.6.2 l
, an ancient (February 2016) and obsolete version.
After downloading a binary release of Go1.11 or later suitable for your system from Go Downloads, please follow the installation instructions, including the instructions for Uninstalling Go for your current version of Go.
edited Nov 26 '18 at 6:29
answered Nov 26 '18 at 0:49
peterSOpeterSO
96.6k15160180
96.6k15160180
add a comment |
add a comment |
There are some breaking changes in Go1.12 in syscall/js
The
Callback
type andNewCallback
function have been renamed; they are now calledFunc
andFuncOf
, respectively. This is a breaking change, but WebAssembly support is still experimental and not yet subject to the Go 1 compatibility promise. Any code using the old names will need to be updated.
If a type implements the new Wrapper interface,
ValueOf
will use it to return the JavaScript value for that type.
The meaning of the zero
Value
has changed. It now represents the JavaScript undefined value instead of the number zero. This is a breaking change, but WebAssembly support is still experimental and not yet subject to the Go 1 compatibility promise. Any code relying on the zero Value to mean the number zero will need to be updated.
The new
Value.Truthy
method reports the JavaScript "truthiness" of a given value.
Here is a link to an example that uses React, Node and Go to get a clearer understanding.
https://github.com/phmatray/webassembly-demo
add a comment |
There are some breaking changes in Go1.12 in syscall/js
The
Callback
type andNewCallback
function have been renamed; they are now calledFunc
andFuncOf
, respectively. This is a breaking change, but WebAssembly support is still experimental and not yet subject to the Go 1 compatibility promise. Any code using the old names will need to be updated.
If a type implements the new Wrapper interface,
ValueOf
will use it to return the JavaScript value for that type.
The meaning of the zero
Value
has changed. It now represents the JavaScript undefined value instead of the number zero. This is a breaking change, but WebAssembly support is still experimental and not yet subject to the Go 1 compatibility promise. Any code relying on the zero Value to mean the number zero will need to be updated.
The new
Value.Truthy
method reports the JavaScript "truthiness" of a given value.
Here is a link to an example that uses React, Node and Go to get a clearer understanding.
https://github.com/phmatray/webassembly-demo
add a comment |
There are some breaking changes in Go1.12 in syscall/js
The
Callback
type andNewCallback
function have been renamed; they are now calledFunc
andFuncOf
, respectively. This is a breaking change, but WebAssembly support is still experimental and not yet subject to the Go 1 compatibility promise. Any code using the old names will need to be updated.
If a type implements the new Wrapper interface,
ValueOf
will use it to return the JavaScript value for that type.
The meaning of the zero
Value
has changed. It now represents the JavaScript undefined value instead of the number zero. This is a breaking change, but WebAssembly support is still experimental and not yet subject to the Go 1 compatibility promise. Any code relying on the zero Value to mean the number zero will need to be updated.
The new
Value.Truthy
method reports the JavaScript "truthiness" of a given value.
Here is a link to an example that uses React, Node and Go to get a clearer understanding.
https://github.com/phmatray/webassembly-demo
There are some breaking changes in Go1.12 in syscall/js
The
Callback
type andNewCallback
function have been renamed; they are now calledFunc
andFuncOf
, respectively. This is a breaking change, but WebAssembly support is still experimental and not yet subject to the Go 1 compatibility promise. Any code using the old names will need to be updated.
If a type implements the new Wrapper interface,
ValueOf
will use it to return the JavaScript value for that type.
The meaning of the zero
Value
has changed. It now represents the JavaScript undefined value instead of the number zero. This is a breaking change, but WebAssembly support is still experimental and not yet subject to the Go 1 compatibility promise. Any code relying on the zero Value to mean the number zero will need to be updated.
The new
Value.Truthy
method reports the JavaScript "truthiness" of a given value.
Here is a link to an example that uses React, Node and Go to get a clearer understanding.
https://github.com/phmatray/webassembly-demo
answered Mar 4 at 23:20
Philippe MatrayPhilippe Matray
1,15311020
1,15311020
add a comment |
add a comment |
Thanks for contributing an answer to Stack Overflow!
- Please be sure to answer the question. Provide details and share your research!
But avoid …
- Asking for help, clarification, or responding to other answers.
- Making statements based on opinion; back them up with references or personal experience.
To learn more, see our tips on writing great answers.
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
StackExchange.ready(
function () {
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f53473392%2funrecognized-import-path-syscall-js%23new-answer', 'question_page');
}
);
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown