test of a lightest formula of code
This commit is contained in:
@@ -16,6 +16,7 @@ type Config struct {
|
||||
Port string
|
||||
LokiUrl string
|
||||
LogLevel string
|
||||
Whitelist bool
|
||||
}
|
||||
|
||||
func (c Config) GetUrl() string {
|
||||
@@ -37,19 +38,11 @@ func GetConfig() *Config {
|
||||
}
|
||||
|
||||
func SetConfig(mongoUrl string, database string, natsUrl string, lokiUrl string, logLevel string) *Config {
|
||||
/*once.Do(func() {
|
||||
instance = &Config{
|
||||
MongoUrl: mongoUrl,
|
||||
MongoDatabase: database,
|
||||
NATSUrl: natsUrl,
|
||||
LokiUrl: lokiUrl,
|
||||
LogLevel: logLevel,
|
||||
}
|
||||
})*/
|
||||
GetConfig().MongoUrl = mongoUrl
|
||||
GetConfig().MongoDatabase = database
|
||||
GetConfig().NATSUrl = natsUrl
|
||||
GetConfig().LokiUrl = lokiUrl
|
||||
GetConfig().LogLevel = logLevel
|
||||
GetConfig().Whitelist = true
|
||||
return GetConfig()
|
||||
}
|
||||
|
Reference in New Issue
Block a user