tiny-rdm/backend/services/storage_service.go

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
}