池应使用 sync.Pool

作者: darrylwest创建于 2017年9月26日更新于 2022年12月31日

使用通道来控制池是可以的,但在我看来,使用来自 stdlib 的 sync.Pool 要好得多。

内容来源: tmrts/go-patterns