From 7339f0336c4b127f67bd57c3a5bee72fa8e0c5cd Mon Sep 17 00:00:00 2001 From: spiritlhl <103393591+spiritLHLS@users.noreply.github.com> Date: Tue, 15 Jul 2025 12:44:24 +0000 Subject: [PATCH] =?UTF-8?q?fix:=20=E4=BF=AE=E5=A4=8D=E4=BC=A0=E9=80=92?= =?UTF-8?q?=E8=BF=87=E7=A8=8B=E4=B8=AD=E9=9D=9E=E6=8C=87=E9=92=88=E4=BC=A0?= =?UTF-8?q?=E9=80=92=E5=AF=BC=E8=87=B4=E7=9A=84=E5=86=99=E5=85=A5=E4=B8=A2?= =?UTF-8?q?=E5=A4=B1?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- goecs.go | 48 ++++++++++++++++++++++++------------------------ 1 file changed, 24 insertions(+), 24 deletions(-) diff --git a/goecs.go b/goecs.go index 4925f79..dfcda8c 100644 --- a/goecs.go +++ b/goecs.go @@ -39,7 +39,7 @@ import ( ) var ( - ecsVersion = "v0.1.54" + ecsVersion = "v0.1.55" menuMode bool onlyChinaTest bool input, choice string @@ -462,11 +462,11 @@ func handleSignalInterrupt(sig chan os.Signal, startTime *time.Time, output *str } } -func runChineseTests(preCheck utils.NetCheckResult, wg1, wg2, wg3 *sync.WaitGroup, basicInfo, securityInfo, emailInfo, mediaInfo, ptInfo *string, output, tempOutput string, startTime time.Time, outputMutex *sync.Mutex) string { - output = runBasicTests(preCheck, basicInfo, securityInfo, output, tempOutput, outputMutex) - output = runCPUTest(output, tempOutput, outputMutex) - output = runMemoryTest(output, tempOutput, outputMutex) - output = runDiskTest(output, tempOutput, outputMutex) +func runChineseTests(preCheck utils.NetCheckResult, wg1, wg2, wg3 *sync.WaitGroup, basicInfo, securityInfo, emailInfo, mediaInfo, ptInfo *string, output *string, tempOutput string, startTime time.Time, outputMutex *sync.Mutex) { + *output = runBasicTests(preCheck, basicInfo, securityInfo, *output, tempOutput, outputMutex) + *output = runCPUTest(*output, tempOutput, outputMutex) + *output = runMemoryTest(*output, tempOutput, outputMutex) + *output = runDiskTest(*output, tempOutput, outputMutex) if (onlyChinaTest || pingTestStatus) && preCheck.Connected && preCheck.StackType != "" && preCheck.StackType != "None" { wg3.Add(1) go func() { @@ -489,24 +489,24 @@ func runChineseTests(preCheck utils.NetCheckResult, wg1, wg2, wg3 *sync.WaitGrou }() } if preCheck.Connected && preCheck.StackType != "" && preCheck.StackType != "None" { - output = runStreamingTests(wg1, mediaInfo, output, tempOutput, outputMutex) - output = runSecurityTests(*securityInfo, output, tempOutput, outputMutex) - output = runEmailTests(wg2, emailInfo, output, tempOutput, outputMutex) + *output = runStreamingTests(wg1, mediaInfo, *output, tempOutput, outputMutex) + *output = runSecurityTests(*securityInfo, *output, tempOutput, outputMutex) + *output = runEmailTests(wg2, emailInfo, *output, tempOutput, outputMutex) } if runtime.GOOS != "windows" && preCheck.Connected && preCheck.StackType != "" && preCheck.StackType != "None" { - output = runNetworkTests(wg3, ptInfo, output, tempOutput, outputMutex) + *output = runNetworkTests(wg3, ptInfo, *output, tempOutput, outputMutex) } if preCheck.Connected && preCheck.StackType != "" && preCheck.StackType != "None" { - output = runSpeedTests(output, tempOutput, outputMutex) + *output = runSpeedTests(*output, tempOutput, outputMutex) } - return appendTimeInfo(output, tempOutput, startTime, outputMutex) + *output = appendTimeInfo(*output, tempOutput, startTime, outputMutex) } -func runEnglishTests(preCheck utils.NetCheckResult, wg1, wg2 *sync.WaitGroup, basicInfo, securityInfo, emailInfo, mediaInfo *string, output, tempOutput string, startTime time.Time, outputMutex *sync.Mutex) string { - output = runBasicTests(preCheck, basicInfo, securityInfo, output, tempOutput, outputMutex) - output = runCPUTest(output, tempOutput, outputMutex) - output = runMemoryTest(output, tempOutput, outputMutex) - output = runDiskTest(output, tempOutput, outputMutex) +func runEnglishTests(preCheck utils.NetCheckResult, wg1, wg2 *sync.WaitGroup, basicInfo, securityInfo, emailInfo, mediaInfo *string, output *string, tempOutput string, startTime time.Time, outputMutex *sync.Mutex) { + *output = runBasicTests(preCheck, basicInfo, securityInfo, *output, tempOutput, outputMutex) + *output = runCPUTest(*output, tempOutput, outputMutex) + *output = runMemoryTest(*output, tempOutput, outputMutex) + *output = runDiskTest(*output, tempOutput, outputMutex) if preCheck.Connected && preCheck.StackType != "" && preCheck.StackType != "None" { if utTestStatus { wg1.Add(1) @@ -522,12 +522,12 @@ func runEnglishTests(preCheck utils.NetCheckResult, wg1, wg2 *sync.WaitGroup, ba *emailInfo = email.EmailCheck() }() } - output = runStreamingTests(wg1, mediaInfo, output, tempOutput, outputMutex) // δΌ ι€’ζŒ‡ι’ˆ - output = runSecurityTests(*securityInfo, output, tempOutput, outputMutex) - output = runEmailTests(wg2, emailInfo, output, tempOutput, outputMutex) - output = runEnglishSpeedTests(output, tempOutput, outputMutex) + *output = runStreamingTests(wg1, mediaInfo, *output, tempOutput, outputMutex) + *output = runSecurityTests(*securityInfo, *output, tempOutput, outputMutex) + *output = runEmailTests(wg2, emailInfo, *output, tempOutput, outputMutex) + *output = runEnglishSpeedTests(*output, tempOutput, outputMutex) } - return appendTimeInfo(output, tempOutput, startTime, outputMutex) + *output = appendTimeInfo(*output, tempOutput, startTime, outputMutex) } func runBasicTests(preCheck utils.NetCheckResult, basicInfo, securityInfo *string, output, tempOutput string, outputMutex *sync.Mutex) string { @@ -810,9 +810,9 @@ func main() { go handleSignalInterrupt(sig, &startTime, &output, tempOutput, uploadDone, &outputMutex) switch language { case "zh": - output = runChineseTests(preCheck, &wg1, &wg2, &wg3, &basicInfo, &securityInfo, &emailInfo, &mediaInfo, &ptInfo, output, tempOutput, startTime, &outputMutex) + runChineseTests(preCheck, &wg1, &wg2, &wg3, &basicInfo, &securityInfo, &emailInfo, &mediaInfo, &ptInfo, &output, tempOutput, startTime, &outputMutex) case "en": - output = runEnglishTests(preCheck, &wg1, &wg2, &basicInfo, &securityInfo, &emailInfo, &mediaInfo, output, tempOutput, startTime, &outputMutex) + runEnglishTests(preCheck, &wg1, &wg2, &basicInfo, &securityInfo, &emailInfo, &mediaInfo, &output, tempOutput, startTime, &outputMutex) default: fmt.Println("Unsupported language") }