Go code
type Person struct {
Name string
Age int
}Line-by-line explanation
- Type creates a new named type.
- Person is the type name.
- Struct begins the field list.
- Name stores text and Age stores an integer.
Expected output
(no output)A type definition changes what the program can create but prints nothing.