I'm going to guess, based on the "break" statement in the final case, that
you expect each of the case statements without a break to fall through to
the nest case. Go does not work like that. By default, each case, whether
there's any action taken or not, breaks. Take a look at this to accomplish
what you're probably looking for: https://play.golang.org/p/0aXXjoshOk9

On Mon, Jun 17, 2019 at 9:26 AM <[email protected]> wrote:

> i write example code standard switch statement
> https://play.golang.org/p/kOplHDBk8Df
>
> program exited without print something.
>
> --
> You received this message because you are subscribed to the Google Groups
> "golang-nuts" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to [email protected].
> To view this discussion on the web visit
> https://groups.google.com/d/msgid/golang-nuts/88c11740-e4a2-43af-8d4f-45c986cc55df%40googlegroups.com
> <https://groups.google.com/d/msgid/golang-nuts/88c11740-e4a2-43af-8d4f-45c986cc55df%40googlegroups.com?utm_medium=email&utm_source=footer>
> .
> For more options, visit https://groups.google.com/d/optout.
>

-- 
You received this message because you are subscribed to the Google Groups 
"golang-nuts" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To view this discussion on the web visit 
https://groups.google.com/d/msgid/golang-nuts/CABn4WMUt%2BD30_OuKORFnMJL6okHYU5TVHKpX-rEqyyJ_Y15DKw%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to