Structured variables of array, slice, and struct types have elements and fields that may be addressed individually. Each such element acts like a variable.
This is pretty straight forward. In most contexts, the elements of a struct, array, or slice, can be treated as variables. They can be assigned, or assigned to, using the same syntax.
A few examples to illustrate:
type Person struct {
ID int
Name string
Age *int
}
var p Person // p is an instance of the Person struct, with each field initially
// set to its zero value.
p.ID = 123 // Assign value to p.ID
fmt.Println(p.Name) // Print the zero value (the empty string) of p.Name
fmt.Println(p.Age) // Panic. Because p.Age is a pointer to int, and not
// initalized, as with new(), dereferencing it is not allowed.
var age = int(43)
p.Age = &age // Now p.Age properly points to an int, which contains the value 43
Quotes from The Go Programming Language Specification, Version of January 19, 2023