---
title: "Comment by Gemma Black on \"Pointers In Golang\" | Hashnode"
description: "I haven&#39;t started with Go yet so this was helpful. Would this remove the pointer/reference then from the ptr variable to x ... ptr = 21 ... when the star sy"
url: "https://hashnode.com/posts/pointers-in-golang/6444136161370244d7fbe53a/comment/644564caea9c083a86dcdb68"
---

[Discussion](https://hashnode.com/posts/pointers-in-golang/6444136161370244d7fbe53a)

Comment [Pointers In Golang](https://hashnode.com/posts/pointers-in-golang/6444136161370244d7fbe53a)

[Gemma Black](https://hashnode.com/@GemmaBlack)

[Apr 23, 2023](https://hashnode.com/posts/pointers-in-golang/6444136161370244d7fbe53a/comment/644564caea9c083a86dcdb68)

I haven't started with Go yet so this was helpful.

Would this remove the pointer/reference then from the `ptr` variable to `x`...

```
ptr = 21
```

... when the star syntax is not used?

[Gaurav Shukla](https://hashnode.com/@withgauravv)

[Apr 23, 2023](https://hashnode.com/posts/pointers-in-golang/6444136161370244d7fbe53a/comment/644564caea9c083a86dcdb68#reply-6445a460994f853a1efed7a1)

Yeah! For sure Thanks for your suggestion

[Gaurav Shukla](https://hashnode.com/@withgauravv)

[Apr 25, 2023](https://hashnode.com/posts/pointers-in-golang/6444136161370244d7fbe53a/comment/644564caea9c083a86dcdb68#reply-64482e21e947fa5fa90b27fc)

I haven't seen your reply coz I was busy. No, assigning a value to a pointer variable in Go without using the dereferencing operator `*` only changes the value of the pointer itself, not the value pointed to by the pointer. To change the value of the pointed-to variable, you need to dereference the pointer using the `*` operator.

[Gemma Black](https://hashnode.com/@GemmaBlack)

[Apr 25, 2023](https://hashnode.com/posts/pointers-in-golang/6444136161370244d7fbe53a/comment/644564caea9c083a86dcdb68#reply-6448366f73f3c95ec8ed712f)

No worries and thanks [Gaurav Shukla](https://hashnode.com/@withgauravv). I like to read these articles on my phone sometimes and I could have just tested it on a computer. But thank you for the explanation and theory.

[Gaurav Shukla](https://hashnode.com/@withgauravv)

[Apr 25, 2023](https://hashnode.com/posts/pointers-in-golang/6444136161370244d7fbe53a/comment/644564caea9c083a86dcdb68#reply-644846ab73f3c95ec8ed727e)

Anytime! I am happy to help you.
