Skip to content

Commit

Permalink
chore: fix some comments (#801)
Browse files Browse the repository at this point in the history
Signed-off-by: shenpengfeng <[email protected]>
  • Loading branch information
shenpengfeng authored Nov 22, 2024
1 parent f93a365 commit d7d4e06
Show file tree
Hide file tree
Showing 4 changed files with 4 additions and 4 deletions.
2 changes: 1 addition & 1 deletion context-aware-reader.md
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ The `Reader`'s `Read` method will read the contents it has into a `[]byte` that

So rather than reading everything, we could:

- Supply a fixed-size byte array that doesnt fit all the contents
- Supply a fixed-size byte array that doesn't fit all the contents
- Send a cancel signal
- Try and read again and this should return an error with 0 bytes read

Expand Down
2 changes: 1 addition & 1 deletion context.md
Original file line number Diff line number Diff line change
Expand Up @@ -279,7 +279,7 @@ One of the main points of `context` is that it is a consistent way of offering c
From the [Go Blog: Context](https://blog.golang.org/context) again:

> At Google, we require that Go programmers pass a Context parameter as the first argument to every function on the call path between incoming and outgoing requests. This allows Go code developed by many different teams to interoperate well. It provides simple control over timeouts and cancelation and ensures that critical values like security credentials transit Go programs properly.
> At Google, we require that Go programmers pass a Context parameter as the first argument to every function on the call path between incoming and outgoing requests. This allows Go code developed by many different teams to interoperate well. It provides simple control over timeouts and cancellation and ensures that critical values like security credentials transit Go programs properly.
(Pause for a moment and think of the ramifications of every function having to send in a context, and the ergonomics of that.)

Expand Down
2 changes: 1 addition & 1 deletion websockets/v1/vendor/github.com/gorilla/websocket/proxy.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion websockets/v2/vendor/github.com/gorilla/websocket/proxy.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

0 comments on commit d7d4e06

Please sign in to comment.