Skip to content

[BUG] FormatMessageType returns empty string for unknown type  #910

@ghost

Description

Is there an existing issue for this?

  • I have searched the existing issues

Current Behavior

FormatMessageType returns the empty string for an unknown message type.

Expected Behavior

FormatMessageType should return the decimal representation of the type when the type is unknown.

Steps To Reproduce

 fmt.Println(websocket.FormatMessageType(7777))

Actual output: blank line
Expected output: 7777

Anything else?

Cc @rfyiamcool

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions