我使用 go 的时间很短,我注意到 Go(标准库)和 golang.org/x/之间存在重复的包。
我的问题是:为什么要发布两次?在这两者中,我应该使用哪一个(更新的、规范的等)?
到目前为止我注意到的一些发布两次的示例包:
golang.org/x/net/html
与net/html
golang.org/x/crypto
与crypto
- 也许还有更多我现在想不起来的...
最佳答案
https://golang.org/pkg/#subrepo
These packages are part of the Go Project but outside the main Go tree. They are developed under looser compatibility requirements than the Go core.
除非您非常需要使用 /x/
变体并且可以接受破坏性更改的风险,否则请使用标准库包。
关于go - golang.org 包和标准库的区别,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/42848636/