Skip to content

redundant-switch-break

Default severity: warning

Go switch cases do not fall through unless they explicitly use fallthrough. An unlabeled break as the final statement of a case is therefore redundant.

switch value {
case 1:
use(value)
break
}
switch value {
case 1:
use(value)
}