examples/echo changed variables for clarity and removed nonexistent method #902
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
What type of PR is this? (check all applicable)
Description
In the example/echo folder, an error has been introduced where a nonexistent function was used. I removed the error and renamed the variables for better clarity.
The variable was messageType that comes from conn.ReadMessage(). messageType is an int with value websocket.BinaryMessage or websocket.TextMessage. Before it was marked as _, but I believe the example would be improved if we used it in a simple way to show that it can be used as an indicator for the type of message.
Related Tickets & Documents
I couldn't find related issues.
Added/updated tests?
Run verifications and test
make verify
is passingmake test
is passingI ran them anyway, even though I didn't change any production code