Skip to content

Commit

Permalink
开启缓存时候加读写锁,防止高并发情况下读写缓存报错问题
Browse files Browse the repository at this point in the history
  • Loading branch information
v_llxjliu committed Aug 31, 2023
1 parent 987bca8 commit d9df98e
Showing 1 changed file with 0 additions and 2 deletions.
2 changes: 0 additions & 2 deletions test/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -54,9 +54,7 @@ func goOmit() {
Collect int `json:"-"`
}
)

articles := Articles{Like: 100, Collect: 20, Tags: []Tag{{"icon", "foo"}, {"icon", "bar"}}}

for i := 0; i < 100; i++ {
go func() {
fmt.Println(filter.Omit("article", &articles)) //尽量传指针,不传指针func选择器中的用指针接收的方法无法被调用
Expand Down

0 comments on commit d9df98e

Please sign in to comment.