Files
moxa/_test/method7.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

21 lines
224 B
Go

package main
type Sample struct {
Name string
}
func (s *Sample) foo(i int) {
println("in foo", s.Name, i)
}
var samples = []Sample{
Sample{"hello"},
}
func main() {
samples[0].foo(3)
}
// Output:
// in foo hello 3