mirror of
				https://gitee.com/dromara/mayfly-go
				synced 2025-11-04 08:20:25 +08:00 
			
		
		
		
	
		
			
				
	
	
		
			17 lines
		
	
	
		
			279 B
		
	
	
	
		
			Go
		
	
	
	
	
	
			
		
		
	
	
			17 lines
		
	
	
		
			279 B
		
	
	
	
		
			Go
		
	
	
	
	
	
package application
 | 
						|
 | 
						|
import (
 | 
						|
	"mayfly-go/internal/redis/infrastructure/persistence"
 | 
						|
	"mayfly-go/pkg/ioc"
 | 
						|
)
 | 
						|
 | 
						|
func init() {
 | 
						|
	persistence.Init()
 | 
						|
 | 
						|
	ioc.Register(new(redisAppImpl), ioc.WithComponentName("RedisApp"))
 | 
						|
}
 | 
						|
 | 
						|
func GetRedisApp() Redis {
 | 
						|
	return ioc.Get[Redis]("RedisApp")
 | 
						|
}
 |