config pb
This commit is contained in:
parent
8eb88dcd82
commit
d273fdc57f
2
conf.go
2
conf.go
@ -32,9 +32,11 @@ func GetConfig() *Config {
|
|||||||
}
|
}
|
||||||
|
|
||||||
func SetConfig(url string, database string) *Config {
|
func SetConfig(url string, database string) *Config {
|
||||||
|
once.Do(func() {
|
||||||
instance = &Config{
|
instance = &Config{
|
||||||
MongoUrl: url,
|
MongoUrl: url,
|
||||||
MongoDatabase: database,
|
MongoDatabase: database,
|
||||||
}
|
}
|
||||||
|
})
|
||||||
return instance
|
return instance
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user