mirror of
https://github.com/traefik/yaegi.git
synced 2026-06-01 18:37:56 +00:00
* gi: rename gi_c into _gi_c * gi: rename test into _test * gi: fix README syntax
17 lines
155 B
Go
17 lines
155 B
Go
package main
|
|
|
|
type T struct {
|
|
f int
|
|
g int
|
|
}
|
|
|
|
func f(i int) int { return i * i }
|
|
|
|
func main() {
|
|
a := T{7, f(4)}
|
|
println(a.f, a.g)
|
|
}
|
|
|
|
// Output:
|
|
// 7 16
|