Skip to content

Commit 1b87473

Browse files
committed
Simplify docs
The docs were way too Canadian with all the pleases ^_^
1 parent f4f1a8c commit 1b87473

File tree

8 files changed

+14
-13
lines changed

8 files changed

+14
-13
lines changed

.github/CONTRIBUTING.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ Reproducible examples are key to finding and fixing bugs.
88

99
## Pull requests
1010

11-
Good issues for first time contributors are marked as such. Please feel free to
11+
Good issues for first time contributors are marked as such. Feel free to
1212
reach out for clarification on what needs to be done.
1313

1414
Split up large changes into several small descriptive commits.
@@ -39,7 +39,7 @@ You can run CI locally. The various steps are located in [ci/\*.sh](../ci).
3939
1. [test.sh](../ci/test.sh)
4040
1. [run.sh](../ci/run.sh) which runs the above scripts in order.
4141

42-
For coverage details locally, please see `ci/out/coverage.html` after running [test.sh](../ci/test.sh).
42+
For coverage details locally, see `ci/out/coverage.html` after running [test.sh](../ci/test.sh).
4343

4444
See [ci/image/Dockerfile](../ci/image/Dockerfile) for the installation of the CI dependencies on Ubuntu.
4545

README.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@ go get nhooyr.io/websocket
3333

3434
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).
3535

36-
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+
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).
3737

3838
### Server
3939

@@ -165,11 +165,11 @@ as performant but much easier to use correctly and idiomatic.
165165

166166
## Contributing
167167

168-
Please see [.github/CONTRIBUTING.md](.github/CONTRIBUTING.md).
168+
See [.github/CONTRIBUTING.md](.github/CONTRIBUTING.md).
169169

170170
## Users
171171

172-
If your company or project is using this library, please feel free to open an issue or PR to amend this list.
172+
If your company or project is using this library, feel free to open an issue or PR to amend this list.
173173

174174
- [Coder](https://github.com/cdr)
175175
- [Tatsu Works](https://github.com/tatsuworks) - Ingresses 20 TB in websocket data every month on their Discord bot.

accept.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@ type AcceptOptions struct {
3434
//
3535
// The only time you need this is if your javascript is running on a different domain
3636
// than your WebSocket server.
37-
// Please think carefully about whether you really need this option before you use it.
37+
// Think carefully about whether you really need this option before you use it.
3838
// If you do, remember that if you store secure data in cookies, you wil need to verify the
3939
// Origin header yourself otherwise you are exposing yourself to a CSRF attack.
4040
InsecureSkipVerify bool

ci/fmt.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,7 @@ check() {
3535
if [[ ${CI:-} && $(unstaged_files) != "" ]]; then
3636
echo
3737
echo "Files need generation or are formatted incorrectly."
38-
echo "Please run:"
38+
echo "Run:"
3939
echo "./ci/fmt.sh"
4040
echo
4141
git status

dial.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -61,7 +61,7 @@ func dial(ctx context.Context, u string, opts *DialOptions) (_ *Conn, _ *http.Re
6161
opts.HTTPClient = http.DefaultClient
6262
}
6363
if opts.HTTPClient.Timeout > 0 {
64-
return nil, nil, fmt.Errorf("please use context for cancellation instead of http.Client.Timeout; see https://github.com/nhooyr/websocket/issues/67")
64+
return nil, nil, fmt.Errorf("use context for cancellation instead of http.Client.Timeout; see https://github.com/nhooyr/websocket/issues/67")
6565
}
6666
if opts.HTTPHeader == nil {
6767
opts.HTTPHeader = http.Header{}

doc.go

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
// Package websocket is a minimal and idiomatic implementation of the WebSocket protocol.
22
//
3-
// See https://tools.ietf.org/html/rfc6455
3+
// https://tools.ietf.org/html/rfc6455
44
//
55
// Conn, Dial, and Accept are the main entrypoints into this package. Use Dial to dial
66
// a WebSocket server, Accept to accept a WebSocket client dial and then Conn to interact
@@ -10,8 +10,9 @@
1010
//
1111
// The wsjson and wspb subpackages contain helpers for JSON and ProtoBuf messages.
1212
//
13-
// Please see https://nhooyr.io/websocket for more overview docs and a
13+
// See https://nhooyr.io/websocket for more overview docs and a
1414
// comparison with existing implementations.
1515
//
16-
// Please be sure to use the https://golang.org/x/xerrors package when inspecting returned errors.
16+
// Use the errors.As function new in Go 1.13 to check for websocket.CloseError.
17+
// See the CloseError example.
1718
package websocket // import "nhooyr.io/websocket"

websocket.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ import (
2424
// You must always read from the connection. Otherwise control
2525
// frames will not be handled. See the docs on Reader and CloseRead.
2626
//
27-
// Please be sure to call Close on the connection when you
27+
// Be sure to call Close on the connection when you
2828
// are finished with it to release the associated resources.
2929
//
3030
// Every error from Read or Reader will cause the connection

websocket_autobahn_python_test.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -234,7 +234,7 @@ func checkWSTestIndex(t *testing.T, path string) {
234234
if failed {
235235
path = strings.Replace(path, ".json", ".html", 1)
236236
if os.Getenv("CI") == "" {
237-
t.Errorf("wstest found failure, please see %q (output as an artifact in CI)", path)
237+
t.Errorf("wstest found failure, see %q (output as an artifact in CI)", path)
238238
}
239239
}
240240
}

0 commit comments

Comments
 (0)