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 0000000..c2e965d Binary files /dev/null and b/remind/remind.db differ 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), }