Loading...
Loading...
Compare original and translation side by side
| Reference | Topics |
|---|---|
| api-design | Export audit, signature evolution, parameter/result object usage |
| errors | Log-and-return, missing |
| interfaces | Compile-time checks, bloat detection, pointer-to-interface, driver pattern |
| concurrency | Embedded mutexes, goroutine leaks, WaitGroup races, unbounded spawning |
| safety | Bare type assertions, missing defer, panic in library, boundary copies |
| performance | |
| code-style | Naming, declarations, organization — combined style checks |
| testing | Table-driven tests, assert vs require, bloated tables, goleak |
| functional-options | Exposed options struct, missing defaults, missing WithX |
| logging | fmt.Sprintf in logs, wrong level, raw structs, global logger in library |
| deterministic-simulation-testing | Direct time/rand/os calls, non-deterministic maps, missing seed logging, over-abstracted DST |
| 参考链接 | 主题 |
|---|---|
| api-design | 导出审计、签名演进、参数/结果对象的使用 |
| errors | 日志并返回、缺失 |
| interfaces | 编译时检查、冗余检测、指针转接口、驱动模式 |
| concurrency | 嵌入互斥锁、goroutine泄漏、WaitGroup竞争、无限制生成goroutine |
| safety | 裸类型断言、缺失defer、库中触发panic、边界拷贝 |
| performance | 使用 |
| code-style | 命名、声明、组织——综合风格检查 |
| testing | 表驱动测试、assert与require的区别、冗余测试表、goleak工具 |
| functional-options | 暴露选项结构体、缺失默认值、缺少WithX方法 |
| logging | 日志中使用fmt.Sprintf、错误日志级别、原始结构体、库中使用全局日志器 |
| deterministic-simulation-testing | 直接调用time/rand/os、非确定性映射、缺失种子日志、过度抽象的确定性模拟测试 |
%w%s%q==var _ I = (*T)(nil)*Interfacectx.Done()wg.Addos.Exitfmt.Sprint[]bytestring+assertfmt.Sprintferr.Error()LogValuer*Contexttime.Now()rand.*os.*%w%q%s==var _ I = (*T)(nil)*Interfacectx.Done()wg.Addos.Exitfmt.Sprint[]bytestring+assertfmt.Sprintferr.Error()LogValuer*Contexttime.Now()rand.*os.*