oc-peer/models/config.go

20 lines
253 B
Go
Raw Normal View History

2024-07-11 11:40:11 +02:00
package models
import "sync"
type Config struct {
MongoUrl string
MongoLogin string
MongoPassword string
}
var instance *Config
var once sync.Once
func GetConfig() *Config {
once.Do(func() {
instance = &Config{}
})
return instance
}