Skip to content
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

examples/echo changed variables for clarity and removed nonexistent method #902

Closed
wants to merge 1 commit into from

Conversation

datadius
Copy link

@datadius datadius commented Mar 6, 2024

What type of PR is this? (check all applicable)

  • Refactor
  • Feature
  • Bug Fix
  • Optimization
  • Documentation Update
  • Go Version Update
  • Dependency Update

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?

  • Yes
  • No, and this is why: I just modified the example for the new users.
  • I need help with writing tests

Run verifications and test

  • make verify is passing
  • make test is passing

I ran them anyway, even though I didn't change any production code

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

1 participant