MCPcopy Create free account
hub / github.com/mmcgrana/gobyexample / main

Function main

examples/pointers/pointers.go:28–42  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

26}
27
28func main() {
29 i := 1
30 fmt.Println("initial:", i)
31
32 zeroval(i)
33 fmt.Println("zeroval:", i)
34
35 // The `&i` syntax gives the memory address of `i`,
36 // i.e. a pointer to `i`.
37 zeroptr(&i)
38 fmt.Println("zeroptr:", i)
39
40 // Pointers can be printed too.
41 fmt.Println("pointer:", &i)
42}

Callers

nothing calls this directly

Calls 2

zerovalFunction · 0.85
zeroptrFunction · 0.85

Tested by

no test coverage detected