Skip to content

Commit d9df98e

Browse files
author
v_llxjliu
committed
开启缓存时候加读写锁,防止高并发情况下读写缓存报错问题
1 parent 987bca8 commit d9df98e

File tree

1 file changed

+0
-2
lines changed

1 file changed

+0
-2
lines changed

test/main.go

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -54,9 +54,7 @@ func goOmit() {
5454
Collect int `json:"-"`
5555
}
5656
)
57-
5857
articles := Articles{Like: 100, Collect: 20, Tags: []Tag{{"icon", "foo"}, {"icon", "bar"}}}
59-
6058
for i := 0; i < 100; i++ {
6159
go func() {
6260
fmt.Println(filter.Omit("article", &articles)) //尽量传指针,不传指针func选择器中的用指针接收的方法无法被调用

0 commit comments

Comments
 (0)