GoPointers


Syntax

  • pointer := &variable // get pointer from variable
  • variable := *pointer // get variable from pointer
  • *pointer = value // set value from variable through the pointer
  • pointer := new(Struct) // get pointer of new struct