Skip to content

Glossary: Go Beyond the Basics

omitempty

A JSON struct-tag option that leaves a field out when it has its zero value, as in `json:"notes,omitempty"`.

Where the book teaches it

Related terms

struct tag