20 lines
251 B
Go
20 lines
251 B
Go
package conf
|
|
|
|
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
|
|
}
|