| 123456789101112131415161718 |
- package config
- import "github.com/runningwater/gohub/pkg/config"
- func init() {
- config.Add("redis", func() map[string]any {
- return map[string]any{
- // Redis 连接配置
- "host": config.Env("REDIS_HOST", "127.0.0.1"),
- "port": config.Env("REDIS_PORT", "6379"),
- "password": config.Env("REDIS_PASSWORD", ""),
- // 业务类型存储使用 1(图片验证码、短信验证码、会话)
- "database": config.Env("REDIS_DATABASE", 1),
- }
- })
- }
|