优化 redis 配置方式

This commit is contained in:
dragon
2025-07-23 16:46:58 +08:00
parent 93a26f1007
commit 4ca455fdae
2 changed files with 16 additions and 7 deletions

View File

@@ -40,7 +40,7 @@ func NewAutoConfig(src string) (KVConfig, error) {
if pass == "" {
pass = query.Get("password")
}
db := query.Get("db")
db := strings.TrimPrefix(parse.Path, "/")
if db == "" {
db = "0"
}