Go comes built-in with a number of Primitive and Composite Data Types. However, you can also create your own custom user-defined data types, and that’s done using Structs.
This article is part of the Data Types in Go series.
Structs (short for “structure”) lets you create composite data types for storing a collection of key-value pairs. Structs are often used for representing real-world entities.