refactor(startup): 简化 WaitGroup 的使用方式

- 直接调用 Wait 方法而不再赋值给变量
- 减少不必要的中间变量声明
- 提高代码可读性与简洁性
This commit is contained in:
2025-11-05 20:47:14 +08:00
parent 236ede6c6c
commit b7342009e2

View File

@@ -25,8 +25,7 @@ func createPipeline() pipeline.RequestPipeline {
func Start() {
results, err := services.Call(http.Serve, createPipeline())
if err == nil {
wg := results[0].(*sync.WaitGroup)
wg.Wait()
results[0].(*sync.WaitGroup).Wait()
} else {
panic(err)
}