Most of this is covered by the Go Tour:
https://go.dev/tour/moretypes/1
You'd use them the same way you use them in any other language.
Pointer arithmetic is actually possible, but it is heavily discouraged,
and comes with a long list of things to keep in mind, and is unnecessary
for most production code.
On 11/23/25 20:12, Kaushal Shriyan wrote:
Hi,
I am learning Go and wanted to clarify something:
Does Go support pointers like languages such as C or C++?
If yes, what exactly can you do with pointers in Go?
For example:
• Can you get the memory address of a variable?
• Can you modify a variable through its pointer?
• Does Go allow pointer arithmetic?
• How are pointers commonly used in real Go programs?
I would appreciate a simple explanation or code examples to better
understand how pointers work in Go.
Thanks in advance.
Best regards,
Kaushal
--
You received this message because you are subscribed to the Google
Groups "golang-nuts" group.
To unsubscribe from this group and stop receiving emails from it, send
an email to [email protected] <mailto:golang-
[email protected]>.
To view this discussion visit https://groups.google.com/d/msgid/golang-
nuts/a7505c98-dcc9-442b-b383-8671dfa01abdn%40googlegroups.com <https://
groups.google.com/d/msgid/golang-nuts/a7505c98-dcc9-442b-
b383-8671dfa01abdn%40googlegroups.com?utm_medium=email&utm_source=footer>.
--
You received this message because you are subscribed to the Google Groups
"golang-nuts" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
To view this discussion visit
https://groups.google.com/d/msgid/golang-nuts/7bfe42a4-9ca6-4dce-8595-d5479a119bb6%40gmail.com.