20 lines
253 B
Go
20 lines
253 B
Go
|
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
|
||
|
}
|