☰
Debian Codegraph
@
0.16.1+git20260209.fcb76d1-2
0.16.1+git20260209.fcb76d1-1
/
/
_test
/
struct58.go
☽
☼
_test/struct58.go
code
plain
raw
symbols
SCIP
Apache-2.0
2019 Containous SAS; 2020 Traefik Labs SAS
debian/copyright
1
package
main
2
3
import
(
4
"fmt"
5
"reflect"
6
)
7
8
type
A
struct
{
9
Test
string
`tag:"test"`
10
}
11
12
func
main() {
13
a :=
A
{}
14
t := reflect.
TypeOf
(a)
15
f, ok := t.
FieldByName
(
"Test"
)
16
if
!ok {
17
return
18
}
19
20
fmt.
Println
(f.
Tag
.
Get
(
"tag"
))
21
}
22
23
// Output:
24
// test