mirror of
https://git.um-react.app/um/cli.git
synced 2026-10-20 13:33:01 +00:00
refactor: replace mmkv.Merge with common.MergeQMCKeys in LoadMMKVOrDefault and LoadMacKeysV10 for improved key merging consistency
This commit is contained in:
@@ -3,7 +3,6 @@ package qmc
|
||||
import (
|
||||
"git.um-react.app/um/cli/algo/common"
|
||||
"git.um-react.app/um/cli/algo/qmc/qmmac"
|
||||
"git.um-react.app/um/cli/internal/mmkv"
|
||||
"go.uber.org/zap"
|
||||
)
|
||||
|
||||
@@ -20,7 +19,7 @@ func LoadMMKVOrDefault(opts MMKVLoaderOptions, logger *zap.Logger) (result commo
|
||||
logger.Warn("LoadMMKVOrDefault: could not read QQMusic v10.x keys", zap.Error(err))
|
||||
}
|
||||
|
||||
allKeys := mmkv.Merge(key1, key2)
|
||||
allKeys := common.MergeQMCKeys(key1, key2)
|
||||
logger.Debug("Keys loaded", zap.Any("keys", allKeys), zap.Int("len", len(allKeys)))
|
||||
return allKeys, nil
|
||||
}
|
||||
|
||||
@@ -159,5 +159,5 @@ func LoadMacKeysV10(logger *zap.Logger) (common.QMCKeys, error) {
|
||||
return nil, err
|
||||
}
|
||||
|
||||
return mmkv.Merge(append(keys1, keys2...)...), nil
|
||||
return common.MergeQMCKeys(append(keys1, keys2...)...), nil
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user