config pb
This commit is contained in:
parent
e3a7703bc5
commit
8eb88dcd82
12
conf.go
12
conf.go
@ -9,16 +9,16 @@ import "sync"
|
||||
// ===================================================
|
||||
|
||||
type Config struct {
|
||||
mongoUrl string
|
||||
mongoDatabase string
|
||||
MongoUrl string
|
||||
MongoDatabase string
|
||||
}
|
||||
|
||||
func (c Config) GetUrl() string {
|
||||
return c.mongoUrl
|
||||
return c.MongoUrl
|
||||
}
|
||||
|
||||
func (c Config) GetDatabase() string {
|
||||
return c.mongoDatabase
|
||||
return c.MongoDatabase
|
||||
}
|
||||
|
||||
var instance *Config
|
||||
@ -33,8 +33,8 @@ func GetConfig() *Config {
|
||||
|
||||
func SetConfig(url string, database string) *Config {
|
||||
instance = &Config{
|
||||
mongoUrl: url,
|
||||
mongoDatabase: database,
|
||||
MongoUrl: url,
|
||||
MongoDatabase: database,
|
||||
}
|
||||
return instance
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user