Golang program that uses fallthrough keyword
With the help of
fallthrough statement, we can use to transfer the program control just after the statement is executed in the switch cases even if the expression does not match. Normally, control will come out of the statement of switch just after the execution of first line after match. Don’t put the fallthrough in the last statement of switch case.
Example 1: In this example we can see that by using switch cases with fallthrough and assuming variable as a string type we can make use of switch cases.
Geek For Geeks