package
0.0.0-20211127175118-db3ee8db598d
Repository: https://github.com/saraginov/learn-go.git
Documentation: pkg.go.dev

# README

Switch

Switch statements express conditionals across many branches.

Commas can be used to separate multiple expressions in the case statement, e.g. case time.Saturday, time.Sunday.

default case is optional.

switch without an expression is an alternate way to express if/else logic. Case expressions can be non-constants.

A type switch compares types instead of values. Can use type switch to discover the type of an interface value.