Go: refactor (#17511)

Signed-off-by: Jin Hai <haijin.chn@gmail.com>
This commit is contained in:
Jin Hai
2026-07-29 18:00:59 +08:00
committed by GitHub
parent 317363e513
commit 1f90755c48
11 changed files with 116 additions and 110 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.Server.SecretKey != nil {
return *globalConfig.Server.SecretKey, nil
if globalConfig.General.SecretKey != nil {
return *globalConfig.General.SecretKey, nil
}
generatedKey, err := utility.GenerateSecretKey()