Pointer stores the memory address where a value lives. In Go, pointers are commonly used when you don't want to copy data, or when you want to change the original value from inside a function.
go
package main
import "fmt"
func updateName(name *string) {
*name = "ThutaTech"
}
func main() {
brand := "Old Name"
updateName(&brand)
fmt.Println(brand)
}&brand gives you the address of the brand variable. *name = "ThutaTech" changes the original value the pointer points to.
You should see
ThutaTechInfo
Go doesn't have pointer arithmetic like C/C++. So while you can use pointers, Go still protects you from certain memory-level mistakes.