Debian Codegraph @

_test/interface3.go

raw symbols SCIP
1 package main
2
3 import "fmt"
4
5 type fii interface {
6 Hello()
7 }
8
9 type Boo struct {
10 Name string
11 }
12
13 func (b Boo) Hello() {
14 fmt.Println("Hello", b)
15 fmt.Println(b.Name)
16 }
17
18 func inCall(foo fii) {
19 fmt.Println("inCall")
20 foo.Hello()
21 }
22
23 func main() {
24 boo := Boo{"foo"}
25 inCall(boo)
26 }
27
28 // Output:
29 // inCall
30 // Hello {foo}
31 // foo