MCPcopy Create free account
hub / github.com/Go-Learning-Land/Go-Learning-Archive / main

Function main

GolangBasics/GoByExample/021Embeding.go:18–39  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

16}
17
18func main() {
19
20 co := container{
21 base: base{
22 num: 1,
23 },
24 str: "some name",
25 }
26
27 fmt.Printf("co={num: %v, str: %v}\n", co.num, co.str)
28
29 fmt.Println("also num:", co.base.num)
30
31 fmt.Println("describe:", co.describe())
32
33 type describer interface {
34 describe() string
35 }
36
37 var d describer = co
38 fmt.Println("describer:", d.describe())
39}

Callers

nothing calls this directly

Calls 3

describeMethod · 0.95
PrintfMethod · 0.80
PrintlnMethod · 0.80

Tested by

no test coverage detected