I Replaced 15 Go Packages With Nothing But the Standard Library — Here's What It Actually Took
Описание и применение
Автор заменил 15 внешних пакетов Go на стандартную библиотеку, создав CLI‑приложение без зависимостей. Это сократило время сборки и устранило необходимость в сети.
Задача
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