MCPcopy
hub / github.com/adonovan/gopl.io / Example_ptrToInterface2

Function Example_ptrToInterface2

ch12/display/display_test.go:76–83  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

74}
75
76func Example_ptrToInterface2() {
77 var i interface{} = 3
78 Display("&i", &i)
79 // Output:
80 // Display &i (*interface {}):
81 // (*&i).type = int
82 // (*&i).value = 3
83}
84
85func Example_array() {
86 Display("x", [1]interface{}{3})

Callers

nothing calls this directly

Calls 1

DisplayFunction · 0.85

Tested by

no test coverage detected