Go has two list-like types, and the difference between them explains why the one you actually use behaves the way it does. Start with the rigid one: the array.
An array's length is part of its type. [3]int is an array of exactly
three ints, and it can never hold four:
var ports [3]int
ports[0] = 80
ports[1] = 443
Because the size is fixed and must be known up front, arrays are rigid. You rarely declare them directly in day-to-day Go - almost everything reaches for the flexible cousin instead, which the next node introduces.
The shape to remember: [N]T is an array of N values of type T, and N
can never change.