fix(be):使用初始化init 初始化一些参数
This commit is contained in:
@ -21,3 +21,8 @@ type Security struct {
|
||||
}
|
||||
|
||||
var Securities []*Security
|
||||
|
||||
func init() {
|
||||
Cron = cron.New(cron.WithSeconds())
|
||||
Cron.Start()
|
||||
}
|
||||
|
@ -69,3 +69,7 @@ func NewStore() *TunStore {
|
||||
store := TunStore{sync.Map{}}
|
||||
return &store
|
||||
}
|
||||
|
||||
func init() {
|
||||
Store = NewStore()
|
||||
}
|
||||
|
Reference in New Issue
Block a user