-
-
Notifications
You must be signed in to change notification settings - Fork 82
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
doc/modules/http.websocket.md: Add usage example to websocket:each() #118
base: master
Are you sure you want to change the base?
Conversation
@@ -53,6 +53,15 @@ The opcode `0x1` will be returned as `"text"` and `0x2` will be returned as `"bi | |||
|
|||
Iterator over [`websocket:receive()`](#http.websocket:receive). | |||
|
This comment was marked as resolved.
This comment was marked as resolved.
Sorry, something went wrong.
doc/modules/http.websocket.md
Outdated
for data, opcode in ws:each() do | ||
print(data, opcode) | ||
end | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Remove trailing new line.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Could you squash down your commits and use a commit message that matches the general form of the project?
doc/modules/http.websocket.md
Outdated
@@ -53,6 +53,16 @@ The opcode `0x1` will be returned as `"text"` and `0x2` will be returned as `"bi | |||
|
|||
Iterator over [`websocket:receive()`](#http.websocket:receive). | |||
|
|||
#### Example {#http.websocket.each-example} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Minor nit: this should be :each
not .each
I hope it's OK now, I'm new to the whole PR workflow (and not that well versed in git either). |
I'm a bit worried about the usefulness of the example beyond the general use of an iterator. |
Do you want to edit your PR further? Or do you think it improves the current docs and should be merged? |
Ping @hollunder ? |
Since it wasn't obvious to me how to use each() I figure it would be useful to have a little example in the documentation.