1
0
mirror of https://github.com/tiny-craft/tiny-rdm.git synced 2025-04-15 07:48:04 +08:00
2023-06-27 15:53:29 +08:00

19 lines
257 B
Go

package services
import "sync"
type storageService struct {
}
var storage *storageService
var onceStorage sync.Once
func Storage() *storageService {
if storage == nil {
onceStorage.Do(func() {
storage = &storageService{}
})
}
return storage
}