Pointerët

package main

import (
    "fmt"
)

func main() {
    a := 65
    fmt.Println(a)

    b := &a

    *b = 78
    fmt.Println(a, *b)

    var c int = 6
    var d *int = &c
    *d = 88
    fmt.Println(c, *d)
}
https://play.golang.org/p/4kXvmZoaH72

Rezultati:

65
78 78
88 88
All Rights Reserved Theme by 404 THEME.