007switch

command
v0.0.0-...-db3ee8d Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Nov 27, 2021 License: MPL-2.0 Imports: 2 Imported by: 0

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.

Documentation

The Go Gopher

There is no documentation for this package.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL