Retrieving a Comprehensive List of Installed Packages in Go
When transferring Go package installations across multiple computers, it becomes necessary to obtain a detailed inventory of all installed packages. This article outlines a straightforward and up-to-date solution for this task.
Solution: Utilizing 'go list'
Contrary to outdated answers, the current recommendation for listing installed packages in Go is to employ the 'go list' command. By specifying three literal periods ('...'), it efficiently retrieves a comprehensive list of every package on the system.
go list ...
This command provides a comprehensive listing of all installed packages, including their dependencies. It is a versatile tool that offers various options for customizing the output. To learn more about its capabilities, refer to the documentation using 'go list -h'.
Alternative Resource: Dave Cheney's Blog Article
Furthermore, Dave Cheney's article titled "go list, your Swiss army knife" delves deeper into the 'go list' command and explores its diverse applications.
免责声明: 提供的所有资源部分来自互联网,如果有侵犯您的版权或其他权益,请说明详细缘由并提供版权或权益证明然后发到邮箱:[email protected] 我们会第一时间内为您处理。
Copyright© 2022 湘ICP备2022001581号-3