dongliang1893 2018-11-26 00:27
浏览 1897
已采纳

无法识别的导入路径“ 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

  • 写回答

2条回答 默认 最新

  • douzhang5121 2018-11-26 00:49
    关注

    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.

    本回答被题主选为最佳回答 , 对您是否有帮助呢?
    评论
查看更多回答(1条)

报告相同问题?

悬赏问题

  • ¥15 matlab 用yalmip搭建模型,cplex求解,线性化处理的方法
  • ¥15 qt6.6.3 基于百度云的语音识别 不会改
  • ¥15 关于#目标检测#的问题:大概就是类似后台自动检测某下架商品的库存,在他监测到该商品上架并且可以购买的瞬间点击立即购买下单
  • ¥15 神经网络怎么把隐含层变量融合到损失函数中?
  • ¥15 lingo18勾选global solver求解使用的算法
  • ¥15 全部备份安卓app数据包括密码,可以复制到另一手机上运行
  • ¥20 测距传感器数据手册i2c
  • ¥15 RPA正常跑,cmd输入cookies跑不出来
  • ¥15 求帮我调试一下freefem代码
  • ¥15 matlab代码解决,怎么运行