Pointer to struct



Struct fields can be accessed through a struct pointer.

To access the field Xof a struct when we have the struct pointer pwe could write(*p).X.

However, that notation is cumbersome, so the language permits us instead to write just p.X, without the ex...



Read: https://blog.cloudnativefolks.org/pointer-to-struct