I just started diving into Go recently and I have one major point of confusion: I am struggling to understand when exactly it is necessary to dereference a pointer explicitl
The selector expression (e.g. x.f) does that:
Selectors automatically dereference pointers to structs. If
xis a pointer to a struct,x.yis shorthand for(*x).y; if the fieldyis also a pointer to a struct,x.y.zis shorthand for(*(*x).y).z, and so on. Ifxcontains an anonymous field of type*A, whereAis also a struct type,x.fis a shortcut for(*x.A).f.
The definition of the indexing operation specifies that an array pointer may be indexed:
For a of type
Aor*AwhereAis an array type, or for a of typeSwhereSis a slice type