fix: 修复文本赋值顺序错位

This commit is contained in:
spiritlhl
2025-07-15 19:29:13 +08:00
committed by GitHub
parent 5a2e68bf92
commit 486b767a25

View File

@@ -396,7 +396,6 @@ func handleSignalInterrupt(sig chan os.Signal, startTime *time.Time, output *str
seconds := int(duration.Seconds()) % 60
currentTime := time.Now().Format("Mon Jan 2 15:04:05 MST 2006")
outputMutex.Lock()
finalOutput := *output
*output = utils.PrintAndCapture(func() {
utils.PrintCenteredTitle("", width)
if language == "zh" {
@@ -407,8 +406,8 @@ func handleSignalInterrupt(sig chan os.Signal, startTime *time.Time, output *str
fmt.Printf("Current Time : %s\n", currentTime)
}
utils.PrintCenteredTitle("", width)
}, tempOutput, finalOutput)
finalOutput = *output
}, tempOutput, *output)
finalOutput := *output
outputMutex.Unlock()
resultChan := make(chan struct {
httpURL string