github.com/traefik/yaegi@v0.15.1/_test/method28.go (about)

     1  package main
     2  
     3  import "fmt"
     4  
     5  type T struct {
     6  	Name string
     7  }
     8  
     9  func (T) create() *T {
    10  	return &T{"Hello"}
    11  }
    12  
    13  func main() {
    14  	fmt.Println(T{}.create())
    15  }
    16  
    17  // Output:
    18  // &{Hello}