List of dependency URLs of a Go project

时光总嘲笑我的痴心妄想 提交于 2021-02-16 20:30:16

问题


I want to get a list of tarball URLs (or similar) of all dependencies in a Go project. I tried to achieve this with 'go list dependency' but I see no possibility to get the source URL of a dependency. How can I get the URL?


回答1:


For the current directory you get the imports by: go list -f '{{join .Imports "\n"}}' .



来源:https://stackoverflow.com/questions/33414849/list-of-dependency-urls-of-a-go-project

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!