☰
Debian Codegraph
@
0.16.1+git20260209.fcb76d1-2
0.16.1+git20260209.fcb76d1-1
/
/
_test
/
switch22.go
☽
☼
_test/switch22.go
code
plain
raw
symbols
SCIP
Apache-2.0
2019 Containous SAS; 2020 Traefik Labs SAS
debian/copyright
1
package
main
2
3
type
T
struct
{
4
Name
string
5
}
6
7
func
f(t
interface
{}) {
8
switch
ext := t.(
type
) {
9
case
*
T
:
10
println(
"*T"
, ext.
Name
)
11
default
:
12
println(
"unknown"
)
13
}
14
}
15
16
func
main() {
17
f(&
T
{
"truc"
})
18
}
19
20
// Output:
21
// *T truc