Loading page...Загружаем страницу...正在加载页面...
AtlasRepo

I Replaced 15 Go Packages With Nothing But the Standard Library — Here's What It Actually Took

说明与用途

作者将 15 个外部 Go 包替换为标准库,构建了一个无依赖的 CLI 2FA 工具,减少了构建时间并消除了网络需求。

问题

Developers often add external Go packages for common utilities, increasing build complexity and dependency risk.

结果

stdotp now has 0 external dependencies, reduced build time, and no network requirement, demonstrating that common utilities can be implemented with the standard library.

工作流

  • 1. Identify each external package used in stdotp.
  • 2. Map each to a standard library alternative or hand‑rolled implementation.
  • 3. Replace imports and adjust code accordingly.
  • 4. Write tests and verify against RFC test vectors.
  • 5. Measure build time and dependency footprint.
  • 6. Publish the zero‑dependency project.

证据

15 packages. Zero require entries in go.mod.

来源

What it took: 2 days. Reading the RFCs carefully, writing test vectors by hand against RFC 4226 Appendix D and RFC 6238 Appendix B.

来源

  • 记录日期: 2026-09-07T17:44:44.568Z