24 lines
		
	
	
		
			341 B
		
	
	
	
		
			Go
		
	
	
	
	
	
		
		
			
		
	
	
			24 lines
		
	
	
		
			341 B
		
	
	
	
		
			Go
		
	
	
	
	
	
|   | package models | ||
|  | 
 | ||
|  | import "sync" | ||
|  | 
 | ||
|  | type Config struct { | ||
|  | 	ZincUrl       string | ||
|  | 	ZincLogin     string | ||
|  | 	ZincPassword  string | ||
|  | 	RedisUrl      string | ||
|  | 	RedisPassword string | ||
|  | 	IdentityFile  string | ||
|  | 	Defaultpeers  string | ||
|  | } | ||
|  | 
 | ||
|  | var instance *Config | ||
|  | var once sync.Once | ||
|  | 
 | ||
|  | func GetConfig() *Config { | ||
|  | 	once.Do(func() { | ||
|  | 		instance = &Config{} | ||
|  | 	}) | ||
|  | 	return instance | ||
|  | } |