mirror of
https://github.com/hanzoai/yaegi.git
synced 2026-10-01 00:49:47 +00:00
19 lines
173 B
Go
19 lines
173 B
Go
package main
|
|
|
|
import "fmt"
|
|
|
|
type T struct {
|
|
Name string
|
|
}
|
|
|
|
func (T) create() *T {
|
|
return &T{"Hello"}
|
|
}
|
|
|
|
func main() {
|
|
fmt.Println(T{}.create())
|
|
}
|
|
|
|
// Output:
|
|
// &{Hello}
|