Skip to content

Glossary: Go Beyond the Basics

comma-ok

Also written: v, ok

A form like `v, ok := <-ch` that gives a second `bool` saying whether the operation really produced a value. For a closed, empty channel, or a missing map key, `ok` is false.

Where the book teaches it

Related terms

closechannel