Refactoring for Gin, NoSurf and SCS continues.
This commit is contained in:
@@ -3,20 +3,20 @@ package config
|
||||
import (
|
||||
"sync"
|
||||
|
||||
"synlotto-website/internal/models"
|
||||
"synlotto-website/internal/platform/config"
|
||||
)
|
||||
|
||||
var (
|
||||
appConfig *models.Config
|
||||
appConfig *config.Config
|
||||
once sync.Once
|
||||
)
|
||||
|
||||
func Init(config *models.Config) {
|
||||
func Init(config *config.Config) {
|
||||
once.Do(func() {
|
||||
appConfig = config
|
||||
})
|
||||
}
|
||||
|
||||
func Get() *models.Config {
|
||||
func Get() *config.Config {
|
||||
return appConfig
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user