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