You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
- JSON and ProtoBuf helpers in the [wsjson](https://godoc.org/nhooyr.io/websocket/wsjson) and [wspb](https://godoc.org/nhooyr.io/websocket/wspb) subpackages
For a production quality example that shows off the full API, see the [echo example on the godoc](https://godoc.org/nhooyr.io/websocket#example-package--Echo). On github, the example is at [example_echo_test.go](./example_echo_test.go).
34
34
35
-
Please use the [golang.org/x/xerrors.As](https://godoc.org/golang.org/x/xerrors#As) package to check for [websocket.CloseError](https://godoc.org/nhooyr.io/websocket#CloseError). See the [CloseError godoc example](https://godoc.org/nhooyr.io/websocket#example-CloseError).
35
+
Please use the [errors.As](https://golang.org/pkg/errors/#As) function [new in Go 1.13](https://golang.org/doc/go1.13#error_wrapping) to check for [websocket.CloseError](https://godoc.org/nhooyr.io/websocket#CloseError). See the [CloseError godoc example](https://godoc.org/nhooyr.io/websocket#example-CloseError).
36
36
37
37
### Server
38
38
@@ -172,4 +172,4 @@ This is a list of companies or projects that use this library.
172
172
173
173
-[Coder](https://github.com/cdr)
174
174
175
-
If your company or project is using this library, please feel free to open a PR to amend the list.
175
+
If your company or project is using this library, please feel free to open an issue or PR to amend the list.
returnnil, nil, xerrors.Errorf("please use context for cancellation instead of http.Client.Timeout; see https://github.com/nhooyr/websocket/issues/67")
64
+
returnnil, nil, fmt.Errorf("please use context for cancellation instead of http.Client.Timeout; see https://github.com/nhooyr/websocket/issues/67")
66
65
}
67
66
ifopts.HTTPHeader==nil {
68
67
opts.HTTPHeader= http.Header{}
69
68
}
70
69
71
70
parsedURL, err:=url.Parse(u)
72
71
iferr!=nil {
73
-
returnnil, nil, xerrors.Errorf("failed to parse url: %w", err)
72
+
returnnil, nil, fmt.Errorf("failed to parse url: %w", err)
0 commit comments