feat: channel WeChat corp account is done

This commit is contained in:
JustSong
2022-11-18 17:41:27 +08:00
parent a308ddfd8b
commit 2a5764f00f
3 changed files with 58 additions and 2 deletions
+3 -2
View File
@@ -48,8 +48,9 @@ func TokenStoreInit() {
}
}
s.Mutex.RLock()
for _, item := range items {
s.Map[item.Key()] = &item
for i := range items {
// s.Map[item.Key()] = &item // This is wrong, you are getting the address of a local variable!
s.Map[items[i].Key()] = &items[i]
}
s.Mutex.RUnlock()
for {