Skip to content

Glossary: Go Beyond the Basics

struct tag

Also written: tag, tags

A note in backquotes after a struct field, such as `json:"price_cents"`, that packages like `encoding/json` read to name the JSON field.

Where the book teaches it

Related terms

json.Marshal / json.Unmarshalomitempty