<p>Does anyone know what is the largest codebase in Go? Free software or proprietary. I am wondering how large Go codebases have grown.</p>
<hr/>**评论:**<br/><br/>amit_kumar_gupta: <pre><p>Diego backend (container scheduler) for Cloud Foundry:</p>
<pre><code>$ cd ~/workspace/diego-release/src/github.com
$ cd for x in cloudfoundry/ cloudfoundry-incubator/ onsi/ pivotal-golang/ tedsuo/ vito/; do \
(cd $x; find . -name '*.go' | grep -v vendor | grep -v Godeps | xargs wc -l); \
done | grep total | rev | cut -f2 -d' ' | rev | paste -s -d+ - | bc
276254
</code></pre>
<p>This also includes tests, testing frameworks, utility packages shared outside the project, and chunks of other projects within the Cloud Foundry ecosystem which Diego interacts (e.g. client libraries for which Diego is one of the primary consumers).</p></pre>adonovan76: <pre><p>Not surprisingly, Google has a lot of Go code. I can't give out precise data, but there are a lot of executables whose dependencies exceed a million lines of Go. Indeed, I found several <em>single Go packages</em> in excess of 200,000 LoC, all generated of course: some were protocol buffers, one was a test, another was some kind of framework. Files like this are a good test that your tools use only linear or n log n algorithms.</p>
<p>If you give people tools that scale, they will do crazy things. As always, software engineering operates at the margins of "what can I get away with?".</p></pre>thewhitetulip: <pre><p>I think the mysql backend for Go would also qualify, along with kubernetes/docker</p></pre>suryon: <pre><p>It's probably some component in one of the Chinese megacorps out there.
We can't be sure unless somebody qualified comments on that.</p></pre>kjk: <pre><p>I'm not claiming docker is the largest, but it is large.</p>
<blockquote>
<p>find . -name "*.go" | xargs wc -l</p>
</blockquote>
<p>returns 397.119 lines with dependencies</p>
<blockquote>
<p>find . -name "*.go" | grep -v vendor | xargs wc -l</p>
</blockquote>
<p>returns 156.489 lines without dependencies</p></pre>kavehmz: <pre><p>Thanks, </p>
<p>You are right. docker and cockroach are both large. I was wondering if any project, commercial or free has reached higher magnitudes of SLOC.</p></pre>dgryski: <pre><p>Canonical's Juju ( <a href="https://github.com/juju/juju">https://github.com/juju/juju</a> ) is also huge.</p>
<p>The main juju repository, not counting dependencies:</p>
<pre><code><dgryski@kamek[juju] \ʕ◔ϖ◔ʔ/ > find . -name '*.go' |xargs wc -l |grep total
558907 total
</code></pre></pre>bmatsuo: <pre><p>Juju and gogs are currently being used as benchmarks for compilation time by the Go team. There is an active thread the golang-dev mailing list about it.</p></pre>howeman: <pre><p>Interesting. Running the same </p>
<blockquote>
<p>find . -name "*.go" | xargs wc -l</p>
</blockquote>
<p>on gonum is 146,781 (there's no vendoring). </p>
<p>About 15,000 lines in the cgo BLAS and LAPACK wrappers, but otherwise pure go (30,000 of which is the partial Go lapack implementation).</p></pre>gngeorgiev: <pre><p>How about kubernetes?</p></pre>
这是一个分享于 的资源,其中的信息可能已经有所发展或是发生改变。
入群交流(和以上内容无关):加入Go大咖交流群,或添加微信:liuxiaoyan-s 备注:入群;或加QQ群:692541889
- 请尽量让自己的回复能够对别人有帮助
- 支持 Markdown 格式, **粗体**、~~删除线~~、
`单行代码`
- 支持 @ 本站用户;支持表情(输入 : 提示),见 Emoji cheat sheet
- 图片支持拖拽、截图粘贴等方式上传