`RunHTTPServerOnAddr` 中的安装不正确可能会导致无限循环

作者: yuyayang02创建于 2024年2月10日更新于 2024年2月10日

在研究 wild-workouts-go-ddd 示例时,我注意到 internal/common/server/http.go 中 `RunHTTPServerOnAddr` 方法在第 24 行出现了一个小问题。`createHandler` 参数是一个函数,需要使用提供的路由参数,并返回一个 http.Handler。我在测试用例和 main.go 文件中观察到,作为参数传递的方法是:

内容来源: ThreeDotsLabs/wild-workouts-go-ddd-example