update: 线程安全

This commit is contained in:
Akkia committed 2022-05-18 10:28:24 +08:00
1 parent 990394bf46
commit 73df5fa0de
3 files changed
+13

No files matched your search

+2
View File
@@ -3,11 +3,13 @@ package singleton
import (
"github.com/naiba/nezha/model"
"github.com/naiba/nezha/pkg/utils"
"sync"
)
var (
ApiTokenList = make(map[string]*model.ApiToken)
UserIDToApiTokenList = make(map[uint64][]string)
ApiLock sync.RWMutex
)
type ServerAPI struct {