如何在 Go 中导入内部包?
import (
"runtime/internal/atomic"
"runtime/internal/sys"
)
imports runtime/internal/atomic: use of internal package not allowed
Go encourages structuring a program as a collection of packages interacting using exported APIs. However, all packages can be imported. This creates a tension when implementing a library or command: it may grow large enough to structure as multiple packages, but splitting it would export the API used in those additional packages to the world. Being able to create packages with restricted visibility would eliminate this tension.
关于go - Go 中的内部包,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/41571946/
欢迎光临 OStack程序员社区-中国程序员成长平台 (https://ostack.cn/) | Powered by Discuz! X3.4 |