Skip to content

gosimple: redundant breaks #35

@mvdan

Description

@mvdan
switch a {
case b:
    foo()
    break
case c:
    bar()
}

Breaks are implicit, so I don't see how a break at the end of a switch case block could ever be useful. Similar to a return at the end of a func that has no named return values.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions