Does Go has pointer features?

177 views
Skip to first unread message

Kaushal Shriyan

unread,
Nov 23, 2025, 1:12:08 PM (12 days ago) Nov 23
to golang-nuts
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

Mikk Margus

unread,
Nov 23, 2025, 1:35:43 PM (12 days ago) Nov 23
to golan...@googlegroups.com
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.
> --
> 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 golang-nuts...@googlegroups.com <mailto:golang-
> nuts+uns...@googlegroups.com>.
> 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>.

Philip Chapman

unread,
Nov 23, 2025, 3:49:54 PM (12 days ago) Nov 23
to Kaushal Shriyan, golang-nuts
Kaushal,

While questions are welcome, this is a really basic question.  Just a few minutes searching the web easily returns the answer.  I recommend you do a tiny bit of reading:

This link answers all your questions with simple explaination and code examples.

---- On Sun, 23 Nov 2025 12:12:08 -0600 Kaushal Shriyan <kaushal...@gmail.com> wrote ---

--
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 golang-nuts...@googlegroups.com.


Fabio Cardona

unread,
Nov 23, 2025, 3:49:58 PM (12 days ago) Nov 23
to golang-nuts
Hi Kaushal,

I agree with Mikk Margus that the official Go Tour is a great starting point. I also recommend you take a look at the official documentation (it is very complete).

You might also find William Kennedy's tour helpful: Pointers in Go.

Best regards,

Fabio

Kaushal Shriyan

unread,
Nov 24, 2025, 10:51:05 PM (11 days ago) Nov 24
to golang-nuts
Thanks Philip, Mikk, and Fabio for guiding me — I really appreciate it.

@Fabio, are you referring to: https://tour.ardanlabs.com/tour/eng/list?
Please confirm.


Thanks in advance.

Best regards,

Kaushal


Reply all
Reply to author
Forward
0 new messages