Files
moxa/_test/ptr4.go
Sebastien Binet 476a31322d Go get ellipsis (#1)
* gi: rename gi_c into _gi_c

* gi: rename test into _test

* gi: fix README syntax
2018-06-26 10:17:01 +02:00

19 lines
155 B
Go

package main
type Foo struct {
val int
}
func f(p *Foo) {
p.val = p.val + 2
}
func main() {
var a = Foo{3}
f(&a)
println(a.val)
}
// Output:
// 5