<p>I was looking at GitHub Repos of CoreOS, Docker and Kubernetes, browsing the code, reading
(don't ask me why I do that, I just like to browse GitHub and read the code and doc,
mostly I am wasting time like that, I know) and what I found interesting is that they are all mainly written in Go. </p>
<p>My question is why? </p>
<p>What is that those programs required that Go gave to them? Is it because of concurrency?</p>
<p>If anyone is willing to elaborate, I played with Docker and know basics and how things work... With GoLang,
I am familiar, read books, but never got my hands dirty in code, so have that in mind, but please do not spare me the info
and in-depth answers. :)</p>
<hr/>**评论:**<br/><br/>denmaradi: <pre><ol>
<li><p>Go is easy to write, read and manage.</p></li>
<li><p>Primitives for concurrency baked into it.</p></li>
<li><p>Go community is big and constantly evolving.</p></li>
</ol></pre>antigiven: <pre><p>Docker is written in Go so Docker-related tools will benefit from being able to import Docker's packages if they're also written in Go.</p>
<p>Also, it's a good language for concurrency and networking and stuff.</p></pre>alexcesaro: <pre><p>See also: <a href="http://www.slideshare.net/jpetazzo/docker-and-go-why-did-we-decide-to-write-docker-in-go">Docker and Go: why did we decide to write Docker in Go?</a></p></pre>Growlizing: <pre><p>It is pleasant to write, it is pleasant to build/deploy (one binary), it is statically typed (I'm looking at you JS/python), it is quite multi-platform.</p></pre>thockin: <pre><p>The real answer is because other things in the same space are written in go. Nothing brighter or dimmer. Go has critical mass in this space.</p></pre>natefinch: <pre><p>...and Juju. </p>
<p>There are many reasons:</p>
<p>Go is very portable, so it runs on all the targets you might want to target, without having to worry about runtimes, and being able to cross compile means you don't need build machines for every platform.</p>
<p>Concurrency is important in a lot of those tools, and Go's support is superior to almost any other major language.</p>
<p>Go is fast, which can be important when scaling out your system... you can't just "add more servers" if your tool is the thing people use to add more servers :)</p>
<p>Writing networked services is exactly what Go was built for, so it shouldn't be surprising that it works well for that job. </p></pre>
这是一个分享于 的资源,其中的信息可能已经有所发展或是发生改变。
入群交流(和以上内容无关):加入Go大咖交流群,或添加微信:liuxiaoyan-s 备注:入群;或加QQ群:692541889
- 请尽量让自己的回复能够对别人有帮助
- 支持 Markdown 格式, **粗体**、~~删除线~~、
`单行代码`
- 支持 @ 本站用户;支持表情(输入 : 提示),见 Emoji cheat sheet
- 图片支持拖拽、截图粘贴等方式上传