package
1.6.23
Repository: https://github.com/mittacy/ego.git
Documentation: pkg.go.dev

# Functions

GetRedis 获取redis连接 @param name 配置名 @param defaultDB 使用哪个数据库 @return *redis.Client.
No description provided by the author
InitMysqlConf 函数功能说明 Example: c = map[string]Conf{ "localhost": { Host: viper.GetString("REDIS_LOCALHOST_RW_HOST"), Password: viper.GetString("REDIS_LOCALHOST_RW_PASSWORD"), Port: viper.GetInt("REDIS_LOCALHOST_RW_PORT"), PoolSize: viper.GetInt("REDIS_LOCALHOST_POOL_SIZE"), MinIdleConn: viper.GetInt("REDIS_LOCALHOST_MIN_IDLE_CONN"), IdleTimeout: viper.GetDuration("REDIS_LOCALHOST_IDLE_TIMEOUT"), }, } @param c.
NewClient 获取新客户端 @param conf 配置名 @param db 使用哪个数据库 @return *redis.Client.

# Variables

No description provided by the author

# Structs

No description provided by the author
ERedis 在结构体引入组合并赋值RedisConfName、RedisDB,即可通过RDB()获取redis连接 Example type User struct { Redis } var user = User{Redis{RedisConfName: "localhost", RedisDB:0}} func (u *User) GetUser(id int64) error { u.GoRedis().Set(k, v) }.