gitlab.com/ethan.reesor/vscode-notebooks/yaegi@v0.0.0-20220417214422-5c573557938e/_test/interface12.go (about) 1 package main 2 3 type I1 interface { 4 Truc() 5 } 6 7 type T1 struct{} 8 9 func (T1) Truc() { println("in T1 truc") } 10 11 var x I1 = T1{} 12 13 func main() { 14 x.Truc() 15 } 16 17 // Output: 18 // in T1 truc