Go项目的依赖项URL列表 [英] List of dependency URLs of a Go project
本文介绍了Go项目的依赖项URL列表的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我想获取Go项目中所有依赖项的tarball URL(或类似名称)列表.我尝试使用转到列表依赖项"实现此目的,但是我看不到获取依赖项的源URL的可能性.如何获取网址?
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?
推荐答案
对于当前目录,您可以通过以下方式获取导入:转到列表-f'{{join .Imports"\ n"}}'.
For the current directory you get the imports by:
go list -f '{{join .Imports "\n"}}' .
这篇关于Go项目的依赖项URL列表的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文