☰
Debian Codegraph
@
0.16.1+git20260209.fcb76d1-2
0.16.1+git20260209.fcb76d1-1
/
/
_test
/
defer4.go
☽
☼
_test/defer4.go
code
plain
raw
symbols
SCIP
Apache-2.0
2019 Containous SAS; 2020 Traefik Labs SAS
debian/copyright
1
package
main
2
3
import
"sync"
4
5
type
T
struct
{
6
mu
sync.
RWMutex
7
name
string
8
}
9
10
func
(t *
T
)
get
()
string
{
11
t.
mu
.
RLock
()
12
defer
t.
mu
.
RUnlock
()
13
return
t.
name
14
}
15
16
var
d =
T
{name:
"test"
}
17
18
func
main() {
19
println(d.
get
())
20
}
21
22
// Output:
23
// test