mirror of
https://github.com/hanzoai/yaegi.git
synced 2026-10-01 00:49:47 +00:00
* gi: rename gi_c into _gi_c * gi: rename test into _test * gi: fix README syntax
19 lines
211 B
Go
19 lines
211 B
Go
package main
|
|
|
|
type Sample struct {
|
|
Name string
|
|
}
|
|
|
|
func (s *Sample) foo(i int) {
|
|
println("in foo", s.Name, i)
|
|
}
|
|
|
|
func main() {
|
|
sample := Sample{"hello"}
|
|
s := &sample
|
|
s.foo(3)
|
|
}
|
|
|
|
// Output:
|
|
// in foo hello 3
|