Refactor and remove sqlite and replace with MySQL
This commit is contained in:
22
internal/platform/config/config.go
Normal file
22
internal/platform/config/config.go
Normal file
@@ -0,0 +1,22 @@
|
||||
package config
|
||||
|
||||
import (
|
||||
"sync"
|
||||
|
||||
"synlotto-website/models"
|
||||
)
|
||||
|
||||
var (
|
||||
appConfig *models.Config
|
||||
once sync.Once
|
||||
)
|
||||
|
||||
func Init(config *models.Config) {
|
||||
once.Do(func() {
|
||||
appConfig = config
|
||||
})
|
||||
}
|
||||
|
||||
func Get() *models.Config {
|
||||
return appConfig
|
||||
}
|
||||
Reference in New Issue
Block a user