使用 go get package-url 导入外部库,该命令会更新 go.mod。选择包时需考虑维护状态、文档、许可证和安全性。Go 模块处理版本管理并确保可重现的构建。
go get package-url
go.mod