1234567891011121314151617181920 |
- package resourceChannel
- import (
- "sync"
- )
- type Conf struct {
- SystemName string `yaml:"system_name"`
- RedisHost string `yaml:"redis_host"`
- }
- var once sync.Once
- var coo *Conf
- func GetMyConf(RedisHost string) *Conf {
- once.Do(func() {
- coo = &Conf{RedisHost: RedisHost}
- })
- return coo
- }
|