Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
What's new
10
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Open sidebar
p2p
go-ws-transport
Commits
e043d1d2
Unverified
Commit
e043d1d2
authored
Oct 19, 2020
by
Steven Allen
Committed by
GitHub
Oct 19, 2020
Browse files
Options
Browse Files
Download
Plain Diff
Merge pull request #96 from steamraven/issue_95
Update for go 1.14 Wasm changes
parents
2c77fd7a
dc7c7133
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
4 additions
and
4 deletions
+4
-4
.travis.yml
.travis.yml
+1
-1
conn_browser.go
conn_browser.go
+3
-3
No files found.
.travis.yml
View file @
e043d1d2
...
...
@@ -14,7 +14,7 @@ env:
install
:
# Manually download and install Go 1.13 instead of using gimme.
# It looks like gimme Go causes some errors on go-test for Wasm.
-
wget -O go.tar.gz https://dl.google.com/go/go1.1
3.4
.linux-amd64.tar.gz
-
wget -O go.tar.gz https://dl.google.com/go/go1.1
5.3
.linux-amd64.tar.gz
-
tar -C ~ -xzf go.tar.gz
-
rm go.tar.gz
-
export GOROOT=~/go
...
...
conn_browser.go
View file @
e043d1d2
...
...
@@ -272,17 +272,17 @@ func arrayBufferToBytes(buffer js.Value) []byte {
func
errorEventToError
(
val
js
.
Value
)
error
{
var
typ
string
if
gotType
:=
val
.
Get
(
"type"
);
gotType
!=
js
.
Undefined
()
{
if
gotType
:=
val
.
Get
(
"type"
);
!
gotType
.
Equal
(
js
.
Undefined
()
)
{
typ
=
gotType
.
String
()
}
else
{
typ
=
val
.
Type
()
.
String
()
}
var
reason
string
if
gotReason
:=
val
.
Get
(
"reason"
);
gotReason
!=
js
.
Undefined
()
&&
gotReason
.
String
()
!=
""
{
if
gotReason
:=
val
.
Get
(
"reason"
);
!
gotReason
.
Equal
(
js
.
Undefined
()
)
&&
gotReason
.
String
()
!=
""
{
reason
=
gotReason
.
String
()
}
else
{
code
:=
val
.
Get
(
"code"
)
if
code
!=
js
.
Undefined
()
{
if
!
code
.
Equal
(
js
.
Undefined
()
)
{
switch
code
:=
code
.
Int
();
code
{
case
1006
:
reason
=
"code 1006: connection unexpectedly closed"
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment