diff --git a/conf/conf.go b/conf/conf.go new file mode 100644 index 0000000..5a2c351 --- /dev/null +++ b/conf/conf.go @@ -0,0 +1,19 @@ +package conf + +import "sync" + +type Config struct { + MongoURL string + DCNAME string + DBPOINT string +} + +var instance *Config +var once sync.Once + +func GetConfig() *Config { + once.Do(func() { + instance = &Config{} + }) + return instance +}