18 lines
206 B
Go
18 lines
206 B
Go
|
package conf
|
||
|
|
||
|
import "sync"
|
||
|
|
||
|
type Config struct {
|
||
|
OcCatalogUrl string
|
||
|
}
|
||
|
|
||
|
var instance *Config
|
||
|
var once sync.Once
|
||
|
|
||
|
func GetConfig() *Config {
|
||
|
once.Do(func() {
|
||
|
instance = &Config{}
|
||
|
})
|
||
|
return instance
|
||
|
}
|