{"action":"created","issue":{"url":"https://api.github.com/repos/golang/go/issues/27749","repository_url":"https://api.github.com/repos/golang/go","labels_url":"https://api.github.com/repos/golang/go/issues/27749/labels{/name}","comments_url":"https://api.github.com/repos/golang/go/issues/27749/comments","events_url":"https://api.github.com/repos/golang/go/issues/27749/events","html_url":"https://github.com/golang/go/issues/27749","id":361660635,"node_id":"MDU6SXNzdWUzNjE2NjA2MzU=","number":27749,"title":"Can't load the package syscall/js","user":{"login":"AchalaSB","id":41888986,"node_id":"MDQ6VXNlcjQxODg4OTg2","avatar_url":"https://avatars0.githubusercontent.com/u/41888986?v=4","gravatar_id":"","url":"https://api.github.com/users/AchalaSB","html_url":"https://github.com/AchalaSB","followers_url":"https://api.github.com/users/AchalaSB/followers","following_url":"https://api.github.com/users/AchalaSB/following{/other_user}","gists_url":"https://api.github.com/users/AchalaSB/gists{/gist_id}","starred_url":"https://api.github.com/users/AchalaSB/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/AchalaSB/subscriptions","organizations_url":"https://api.github.com/users/AchalaSB/orgs","repos_url":"https://api.github.com/users/AchalaSB/repos","events_url":"https://api.github.com/users/AchalaSB/events{/privacy}","received_events_url":"https://api.github.com/users/AchalaSB/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":4,"created_at":"2018-09-19T09:35:00Z","updated_at":"2018-09-19T10:05:03Z","closed_at":null,"author_association":"NONE","body":"Please answer these questions before submitting your issue. Thanks!\r\n\r\n\r\n### What version of Go are you using (`go version`)?\r\ngo version go1.11 linux/amd64\r\n\r\n### Does this issue reproduce with the latest release?\r\nyes\r\n\r\n### What operating system and processor architecture are you using (`go env`)?\r\nGOARCH=\"amd64\"\r\nGOBIN=\"\"\r\nGOCACHE=\"/home/achala/.cache/go-build\"\r\nGOEXE=\"\"\r\nGOFLAGS=\"\"\r\nGOHOSTARCH=\"amd64\"\r\nGOHOSTOS=\"linux\"\r\nGOOS=\"linux\"\r\nGOPATH=\"/home/achala/go\"\r\nGOPROXY=\"\"\r\nGORACE=\"\"\r\nGOROOT=\"/usr/lib/go\"\r\nGOTMPDIR=\"\"\r\nGOTOOLDIR=\"/usr/lib/go/pkg/tool/linux_amd64\"\r\nGCCGO=\"gccgo\"\r\nCC=\"gcc\"\r\nCXX=\"g++\"\r\nCGO_ENABLED=\"1\"\r\nGOMOD=\"\"\r\nCGO_CFLAGS=\"-g -O2\"\r\nCGO_CPPFLAGS=\"\"\r\nCGO_CXXFLAGS=\"-g -O2\"\r\nCGO_FFLAGS=\"-g -O2\"\r\nCGO_LDFLAGS=\"-g -O2\"\r\nPKG_CONFIG=\"pkg-config\"\r\nGOGCCFLAGS=\"-fPIC -m64 -pthread -fmessage-length=0 -fdebug-prefix-map=/tmp/go-build813004705=/tmp/go-build -gno-record-gcc-switches\"\r\n\r\n\r\n### What did you do?\r\nI'm running code in webserver but getting an error. \r\nEven though there is an package error, when I run \r\n```\r\nGOOS=js GOARCH=wasm go build -o lib.wasm main.go \r\n```\r\nthe lib.wasm file created without any error. And port is opening but the program is not executing.\r\n```\r\ngo get syscall/js\r\ncan't load package: package syscall/js: build constraints exclude all Go files in /usr/lib/go/src/syscall/js\r\n```\r\n"},"comment":{"url":"https://api.github.com/repos/golang/go/issues/comments/422738922","html_url":"https://github.com/golang/go/issues/27749#issuecomment-422738922","issue_url":"https://api.github.com/repos/golang/go/issues/27749","id":422738922,"node_id":"MDEyOklzc3VlQ29tbWVudDQyMjczODkyMg==","user":{"login":"davecheney","id":7171,"node_id":"MDQ6VXNlcjcxNzE=","avatar_url":"https://avatars0.githubusercontent.com/u/7171?v=4","gravatar_id":"","url":"https://api.github.com/users/davecheney","html_url":"https://github.com/davecheney","followers_url":"https://api.github.com/users/davecheney/followers","following_url":"https://api.github.com/users/davecheney/following{/other_user}","gists_url":"https://api.github.com/users/davecheney/gists{/gist_id}","starred_url":"https://api.github.com/users/davecheney/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/davecheney/subscriptions","organizations_url":"https://api.github.com/users/davecheney/orgs","repos_url":"https://api.github.com/users/davecheney/repos","events_url":"https://api.github.com/users/davecheney/events{/privacy}","received_events_url":"https://api.github.com/users/davecheney/received_events","type":"User","site_admin":false},"created_at":"2018-09-19T10:05:03Z","updated_at":"2018-09-19T10:05:03Z","author_association":"CONTRIBUTOR","body":"How did you compile this? How did you execute this? What did you see when you did so? \n\nPlease try to give as many details as possible as the wasm support in go 1.11 is very new and not a lot of people have experience with it.\n\n> On 19 Sep 2018, at 19:55, Achala_Bhatt <notifications@github.com> wrote:\n> \n> Below is my code\n> \n> package main\n> \n> import (\n> \t\"flag\"\n> \t\"log\"\n> \t\"net/http\"\n> \t\"syscall/js\"\n> )\n> \n> var (\n> \tlisten = flag.String(\"listen\", \":8080\", \"listen address\")\n> \tdir    = flag.String(\"dir\", \".\", \"directory to serve\")\n> )\n> \n> func add(i []js.Value) {\n> \tjs.Global().Set(\"output\", js.ValueOf(i[0].Int()+i[1].Int()))\n> \tprintln(js.ValueOf(i[0].Int() + i[1].Int()).String())\n> \n> }\n> func registerCallbacks() {\n> \tjs.Global().Set(\"add\", js.NewCallback(add))\n> \n> }\n> \n> func main() {\n> \tflag.Parse()\n> \tlog.Printf(\"listening on %q...\", *listen)\n> \tlog.Fatal(http.ListenAndServe(*listen, http.FileServer(http.Dir(*dir))))\n> \tc := make(chan struct{}, 0)\n> \n> \tprintln(\"WASM Go Initialized\")\n> \t// register functions\n> \tregisterCallbacks()\n> \t<-c\n> }\n> —\n> You are receiving this because you commented.\n> Reply to this email directly, view it on GitHub, or mute the thread.\n"}}
{"actor":{"display_login":"davecheney"}}