From da855c1b294ffec09ff0ac5c5a4bfec7ad28fce6 Mon Sep 17 00:00:00 2001 From: starainrt Date: Thu, 18 May 2023 16:53:19 +0800 Subject: [PATCH] update --- .idea/.gitignore | 8 -------- .idea/candy.iml | 9 --------- .idea/modules.xml | 8 -------- remind/remind.db | Bin 0 -> 16384 bytes remind/remind.go | 4 ++-- 5 files changed, 2 insertions(+), 27 deletions(-) delete mode 100644 .idea/.gitignore delete mode 100644 .idea/candy.iml delete mode 100644 .idea/modules.xml create mode 100644 remind/remind.db diff --git a/.idea/.gitignore b/.idea/.gitignore deleted file mode 100644 index 35410ca..0000000 --- a/.idea/.gitignore +++ /dev/null @@ -1,8 +0,0 @@ -# 默认忽略的文件 -/shelf/ -/workspace.xml -# 基于编辑器的 HTTP 客户端请求 -/httpRequests/ -# Datasource local storage ignored files -/dataSources/ -/dataSources.local.xml diff --git a/.idea/candy.iml b/.idea/candy.iml deleted file mode 100644 index 5e764c4..0000000 --- a/.idea/candy.iml +++ /dev/null @@ -1,9 +0,0 @@ - - - - - - - - - \ No newline at end of file diff --git a/.idea/modules.xml b/.idea/modules.xml deleted file mode 100644 index bc415cb..0000000 --- a/.idea/modules.xml +++ /dev/null @@ -1,8 +0,0 @@ - - - - - - - - \ No newline at end of file diff --git a/remind/remind.db b/remind/remind.db new file mode 100644 index 0000000000000000000000000000000000000000..c2e965d27d3aac07375b357a47ba7972bfcd0966 GIT binary patch literal 16384 zcmeI&O-ma=7zgl~tfZvSuJjU?UWPp-xJsc?Y(VJ74sB>mblnt#h-}R$i`iH=n~+dM zN}=?o^*a>tPy}y&AS3qBn?3g_qo5uJ50TjnUekRSj72tWV=5P$##AOHaf zKmY=FEHG)LvrjEv3tJ7P zjPQCAd}ylnMw3p?OKr8$QLW|cP2)VC?-t8aT$`I~1(9-SWqyl4$XXWvtV8N=>1XOn z0Ns}h8?-@RzLB1o@k-OKR~PSOUAQ&BTB^{3X<6|d+NpT&dQ)#*FZW_R?<}u3l=HlRBd*Wnocd)&4 z`gM2k?fdc07mC7DhCctFG4t%ce-Ph?00bZa0SG_<0uX=z1Rwwb2teRg1v1>QGWtrv oLki5zKa4UG1Rwwb2tWV=5P$##AOHafKmY>&l|Y8h|N0`qU+;O7UH||9 literal 0 HcmV?d00001 diff --git a/remind/remind.go b/remind/remind.go index cfef7a1..f3a0004 100644 --- a/remind/remind.go +++ b/remind/remind.go @@ -13,7 +13,7 @@ import ( type Remind struct { db *stardb.StarDB tasks map[int]Task - mu sync.RWMutex + mu *sync.RWMutex callback func(remind Task) } @@ -52,7 +52,7 @@ func NewRemind(db *stardb.StarDB, callback func(task Task)) (*Remind, error) { func innerLoadDB(db *stardb.StarDB, callback func(task Task)) (*Remind, error) { var rem = Remind{ db: db, - mu: sync.RWMutex{}, + mu: new(sync.RWMutex), callback: callback, tasks: make(map[int]Task), }