<p><a href="https://gist.github.com/elvarb/c680e52b83f069cc5e4cd2e8033999d3">https://gist.github.com/elvarb/c680e52b83f069cc5e4cd2e8033999d3</a></p>
<p>Because the API has a rate limit it is better to generate an API key for this.</p>
<p><a href="https://github.com/settings/tokens">https://github.com/settings/tokens</a></p>
<p>Example output</p>
<pre><code>encoding/hex
encoding/json
encoding/pem
errors
flag
fmt
github.com/BurntSushi/toml
-> License: MIT License
github.com/fsnotify/fsnotify
-> License: BSD 3-clause "New" or "Revised" License
github.com/hashicorp/hcl
-> License: Mozilla Public License 2.0
</code></pre>
<p>This really should be a go program or a feature in go list.</p>
<hr/>**评论:**<br/><br/>ChristophBerger: <pre><p>Nice! </p>
<p>The next iteration could be a re-write in Go (= cross-platform)...
(Or does someone have a powershell-to-fish converter around?)</p></pre>noonexx: <pre><p>The newest PowerShell is cross-platform and afaik open source. The script above works just as well on my Linux installation.</p></pre>ChristophBerger: <pre><p>Wow, didn't know that. But it <a href="https://github.com/PowerShell/PowerShell">appears to be true</a>...</p>
<p>Guess I'll have to check this out...</p></pre>Redundancy_: <pre><p>I think the question is why anyone would want to read or write powershell by choice. I've provisioned machines with it, but I really hate using it due to the way that it's more a shell script than a programming language (in error handling and string manipulation etc)</p></pre>slantview: <pre><p>Honestly, being written for go but using powershell is just kinda head scratching.</p></pre>DudPug: <pre><p>It was just something I needed to do quickly and I'm still more proficient in powershell than in go.</p>
<p>Should be very easy to do in go though and might be something I do in the future. </p></pre>anxiousalpaca: <pre><p>sweet</p></pre>
After reading about go list I made a small powershell script that will list all dependencies of a project, but also query the Github API for license information for all github imported packages
blov · · 447 次点击这是一个分享于 的资源,其中的信息可能已经有所发展或是发生改变。
入群交流(和以上内容无关):加入Go大咖交流群,或添加微信:liuxiaoyan-s 备注:入群;或加QQ群:692541889
- 请尽量让自己的回复能够对别人有帮助
- 支持 Markdown 格式, **粗体**、~~删除线~~、
`单行代码`
- 支持 @ 本站用户;支持表情(输入 : 提示),见 Emoji cheat sheet
- 图片支持拖拽、截图粘贴等方式上传