Go: refactor config (#17544)

Signed-off-by: Jin Hai <haijin.chn@gmail.com>
This commit is contained in:
Jin Hai
2026-07-31 17:18:45 +08:00
committed by GitHub
parent 9db2e2314a
commit 36ae39bc60
60 changed files with 2708 additions and 1040 deletions

View File

@@ -91,8 +91,8 @@ func InitVariables(store VariableStore) error {
// GetSecretKey returns the current secret key
func GetSecretKey(store VariableStore) (string, error) {
if globalConfig.General.SecretKey != nil {
return *globalConfig.General.SecretKey, nil
if globalConfig.GetSecretKey() != "" {
return globalConfig.GetSecretKey(), nil
}
generatedKey, err := utility.GenerateSecretKey()