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

     1  package main
     2  
     3  import "fmt"
     4  
     5  func (t MyT) Test() string {
     6  	return "hello"
     7  }
     8  
     9  type MyT int
    10  
    11  func main() {
    12  	t := MyT(1)
    13  
    14  	fmt.Println(t.Test())
    15  }
    16  
    17  // Output:
    18  // hello