Skip to content

[Enhancement] eliminate type assertions in the switch case.[cloudevents.go] #3765

@Alonexc

Description

@Alonexc

Search before asking

  • I had searched in the issues and found no similar issues.

Enhancement Request

This issue is a subproject issue of eventmesh. the subproject address is:
https://github.com/apache/eventmesh-go
image
located at:
eventmesh-go/plugin/protocol/cloudevents/cloudevents.go
analysis and expalanation:
assigning the result of this type assertion to a variable (switch msg := msg.(type)) could eliminate type assertions in switch cases

Describe the solution you'd like

image

Are you willing to submit PR?

  • Yes I am willing to submit a PR!

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