Go 中的接口型函数 Function Interface Pattern
Go 通过将函数作为接口的实现定义函数类型并实现该接口的方法。net/http.HandlerFunc 是典型例子。本文展示这种灵活的设计模式。
21
0
0
2026-07-07