From 5bc444d13cfeca3ee4d58f19e1a7029e4835c3d8 Mon Sep 17 00:00:00 2001 From: Andrew Gerrand Date: Wed, 10 Dec 2014 11:35:11 +1100 Subject: [PATCH] Wiki data import from Google Code --- Articles.md | 104 +++ Books.md | 148 ++++ BoundingResourceUse.md | 28 + ChromeOS.md | 34 + CodeReview.md | 104 +++ CodeReviewComments.md | 255 +++++++ Comments.md | 23 + CommonMistakes.md | 58 ++ Contributing.md | 5 + Courses.md | 44 ++ DashboardBuilders.md | 74 ++ DesignDocuments.md | 52 ++ Errors.md | 82 ++ FreeBSD.md | 16 + GOPATH.md | 52 ++ GcToolchainTricks.md | 96 +++ GccgoCrossCompilation.md | 113 +++ GithubCodeLayout.md | 110 +++ Go1point1Gotchas.md | 115 +++ GoArm.md | 369 +++++++++ GoForCPPProgrammers.md | 864 +++++++++++++++++++++ GoGetProxyConfig.md | 21 + GoGetTools.md | 10 + GoStrings.md | 59 ++ GoTalks.md | 204 +++++ GoUserGroups.md | 80 ++ GoUsers.md | 113 +++ GoVsGenerics.md | 41 + HandlingIssues.md | 35 + Hashing.md | 25 + HostedContinuousIntegration.md | 17 + HowToAsk.md | 114 +++ HttpFetch.md | 6 + HttpStaticFiles.md | 20 + IDEsAndTextEditorPlugins.md | 37 + InstallFromSource.md | 27 + InstallTroubleshooting.md | 55 ++ InstallingExp.md | 11 + InterfaceSlice.md | 42 ++ Iota.md | 32 + Learn.md | 4 + LockOSThread.md | 51 ++ MethodSets.md | 124 ++++ MultipleGoRoots.md | 33 + MutexOrChannel.md | 24 + NativeClient.md | 18 + NetBSD.md | 10 + NonEnglish.md | 48 ++ OlderVersions.md | 22 + OpenBSD.md | 75 ++ PackageManagementTools.md | 180 +++++ PackagePublishing.md | 125 ++++ PanicAndRecover.md | 84 +++ PerfDashboard.md | 71 ++ PortingPolicy.md | 53 ++ Projects.md | 1277 ++++++++++++++++++++++++++++++++ ProviderIntegration.md | 19 + RaceDetector.md | 2 + Range.md | 56 ++ RateLimiting.md | 149 ++++ Rationales.md | 29 + SQLDrivers.md | 29 + SQLInterface.md | 123 +++ Screencasts.md | 9 + SendingMail.md | 69 ++ SignalHandling.md | 28 + SimultaneousAssignment.md | 18 + SliceTricks.md | 96 +++ Style.md | 1 + SubRepositories.md | 28 + SuccessStories.md | 37 + Switch.md | 186 +++++ TableDrivenTests.md | 49 ++ Timeouts.md | 25 + Ubuntu.md | 26 + WindowsBuild.md | 85 +++ WindowsCrossCompiling.md | 71 ++ WindowsDLLs.md | 136 ++++ WindowsSupport.md | 5 + cgo.md | 313 ++++++++ heapdump13.md | 182 +++++ heapdump14.md | 178 +++++ whygo.md | 82 ++ 83 files changed, 7925 insertions(+) create mode 100644 Articles.md create mode 100644 Books.md create mode 100644 BoundingResourceUse.md create mode 100644 ChromeOS.md create mode 100644 CodeReview.md create mode 100644 CodeReviewComments.md create mode 100644 Comments.md create mode 100644 CommonMistakes.md create mode 100644 Contributing.md create mode 100644 Courses.md create mode 100644 DashboardBuilders.md create mode 100644 DesignDocuments.md create mode 100644 Errors.md create mode 100644 FreeBSD.md create mode 100644 GOPATH.md create mode 100644 GcToolchainTricks.md create mode 100644 GccgoCrossCompilation.md create mode 100644 GithubCodeLayout.md create mode 100644 Go1point1Gotchas.md create mode 100644 GoArm.md create mode 100644 GoForCPPProgrammers.md create mode 100644 GoGetProxyConfig.md create mode 100644 GoGetTools.md create mode 100644 GoStrings.md create mode 100644 GoTalks.md create mode 100644 GoUserGroups.md create mode 100644 GoUsers.md create mode 100644 GoVsGenerics.md create mode 100644 HandlingIssues.md create mode 100644 Hashing.md create mode 100644 HostedContinuousIntegration.md create mode 100644 HowToAsk.md create mode 100644 HttpFetch.md create mode 100644 HttpStaticFiles.md create mode 100644 IDEsAndTextEditorPlugins.md create mode 100644 InstallFromSource.md create mode 100644 InstallTroubleshooting.md create mode 100644 InstallingExp.md create mode 100644 InterfaceSlice.md create mode 100644 Iota.md create mode 100644 Learn.md create mode 100644 LockOSThread.md create mode 100644 MethodSets.md create mode 100644 MultipleGoRoots.md create mode 100644 MutexOrChannel.md create mode 100644 NativeClient.md create mode 100644 NetBSD.md create mode 100644 NonEnglish.md create mode 100644 OlderVersions.md create mode 100644 OpenBSD.md create mode 100644 PackageManagementTools.md create mode 100644 PackagePublishing.md create mode 100644 PanicAndRecover.md create mode 100644 PerfDashboard.md create mode 100644 PortingPolicy.md create mode 100644 Projects.md create mode 100644 ProviderIntegration.md create mode 100644 RaceDetector.md create mode 100644 Range.md create mode 100644 RateLimiting.md create mode 100644 Rationales.md create mode 100644 SQLDrivers.md create mode 100644 SQLInterface.md create mode 100644 Screencasts.md create mode 100644 SendingMail.md create mode 100644 SignalHandling.md create mode 100644 SimultaneousAssignment.md create mode 100644 SliceTricks.md create mode 100644 Style.md create mode 100644 SubRepositories.md create mode 100644 SuccessStories.md create mode 100644 Switch.md create mode 100644 TableDrivenTests.md create mode 100644 Timeouts.md create mode 100644 Ubuntu.md create mode 100644 WindowsBuild.md create mode 100644 WindowsCrossCompiling.md create mode 100644 WindowsDLLs.md create mode 100644 WindowsSupport.md create mode 100644 cgo.md create mode 100644 heapdump13.md create mode 100644 heapdump14.md create mode 100644 whygo.md diff --git a/Articles.md b/Articles.md new file mode 100644 index 00000000..6b0d5afc --- /dev/null +++ b/Articles.md @@ -0,0 +1,104 @@ +# English + +## General + * [Go: A New Language for a New Year](http://kylelemons.net/2012/01/go-new-language-new-year/) _2012-01-06_ + * [Why you PHP guys should learn Golang](http://www.mikespook.com/2012/08/why-you-php-guys-should-learn-golang/) _2012-08-10_ + * [Why I went from Python to Go (and not node.js)](http://jordanorelli.tumblr.com/post/31533769172/why-i-went-from-python-to-go-and-not-node-js) _2012-09-14_ + * [Why I program in Go](http://tech.t9i.in/2013/01/why-program-in-go/) _2013-01-05_ + * [What I Love About Go](http://blog.natefinch.com/2013/01/what-i-love-about-go.html) _2013-01-25_ + * [Google Go: The Good, the Bad, and the Meh](http://blog.carlsensei.com/post/42828735125) _2013-02-10_ + * [Switching from Python to Go](https://www.spacemonkey.com/blog/posts/go-space-monkey) _2014-04-21_ + +## Concurrency / Channels + * [Concurrent Idioms #1: Broadcasting values in Go with linked channels](http://rogpeppe.wordpress.com/2009/12/01/concurrent-idioms-1-broadcasting-values-in-go-with-linked-channels/) _2009-12-01_ + * [Unlimited Buffering with Low Overhead](http://rogpeppe.wordpress.com/2010/02/10/unlimited-buffering-with-low-overhead/) _2010-02-10_ + * [Golang: Funny Play with Channel](http://www.mikespook.com/2012/05/golang-funny-play-with-channel/) _2012-05-25_ + * [Stacked channels](http://gowithconfidence.tumblr.com/post/31426832143/stacked-channels) _2012-09-12_ + * [Just muxing about](http://gowithconfidence.tumblr.com/post/31431608488/muxing) _2012-09-12_ + * [applied mux()ing: a LimitBuffer](http://gowithconfidence.tumblr.com/post/31797884887/limit-buffers) _2012-09-18_ + * [Fundamentals of concurrent programming](http://www.nada.kth.se/~snilsson/concurrency/) _2013-01-27_ + +## Interfaces / OOP + * [no methods on interfaces](http://gowithconfidence.tumblr.com/post/31735316104/interface-methods) _2012-09-17_ + * [How to use interfaces in Go](http://jordanorelli.tumblr.com/post/32665860244/how-to-use-interfaces-in-go) _2012-10-01_ + * [Go Object Oriented Design](http://nathany.com/good) _2013-01-14_ + * [It is ridiculously easy to refactor Go](http://www.onebigfluke.com/2013/01/it-is-ridiculously-easy-to-refactor-go.html) _2013-01-27_ + * [Functional Iteration in Go](http://hackthology.com/functional-iteration-in-go.html) _2013-12-13_ + +## Web Development + * [Auth and Sessions](http://shadynasty.biz/blog/2012/09/05/auth-and-sessions/) _2012-09-05_ + * [Painless Web Handlers in Go](http://shadynasty.biz/blog/2012/08/07/painless-web-handlers-in-go/) _2012-08-07_ + * [Implementing Chat with WebSockets](http://gary.beagledreams.com/page/go-websocket-chat.html) _2012-03-22_ + +## Misc + * [Zero Downtime upgrades of TCP servers in Go](http://blog.nella.org/?p=879) _2012-05-29_ + * [Using the Go Regexp Package](http://blog.kamilkisiel.net/blog/2012/07/05/using-the-go-regexp-package/) _2012-07-05_ + * [Function Call by Name in Golang](http://www.mikespook.com/2012/07/function-call-by-name-in-golang/) _2012-07-05_ + * [An introduction to cross compilation with Go](http://dave.cheney.net/2012/09/08/an-introduction-to-cross-compilation-with-go) _2012-09-08_ + * [Applying The Clean Architecture to Go applications](http://manuel.kiessling.net/2012/09/28/applying-the-clean-architecture-to-go-applications/) _2012-09-08_ + * [Methods as Objects in Go](http://ernestmicklei.com/2012/11/26/methods-as-objects-in-go/) _2012-12-26_ + * [Optimizing Real World Go](http://bpowers.github.com/weblog/2013/01/05/optimizing-real-world-go/) _2013-01-05_ + * [Go-spew: A Journey into Dumping Go Data Structures](https://blog.cyphertite.com/go-spew-a-journey-into-dumping-go-data-structures/) _2013-01-09_ + * [I2C Programming in Go](http://www.gmcbay.com/2013/01/i2c-programming-in-go/) _2013-01-12_ + * [Function Types in Go (golang)](http://jordanorelli.tumblr.com/post/42369331748/function-types-in-go-golang) _2013-02-05_ + * [Go & Assembly](http://www.doxsey.net/blog/go-and-assembly) _2013-02-05_ + * [State machines in Go (#golang)](http://denis.papathanasiou.org/?p=1190) _2013-02-10_ + * [Go Reflection Codex](http://jimmyfrasche.github.io/go-reflection-codex/) + + +# Chinese + * [How to write Go code](http://chenxiaoyu.org/2012/03/14/howto-write-golang-code.html) + * [Test Go module](http://chenxiaoyu.org/2012/12/07/golang-module-test-benchmark.html) + * [Build web application with golang](https://github.com/astaxie/build-web-application-with-golang) + * [Go语言评估报告](https://docs.google.com/document/d/1NosYIbM6tfBqKh49BrHOngBfXuT1MfrvYXwc_ikwuMk/edit) + * [Why you PHP guys should learn Golang](http://www.mikespook.com/2012/08/%e4%b8%ba%e4%bb%80%e4%b9%88phper%e5%ba%94%e5%bd%93%e5%ad%a6%e4%b9%a0golang/) + * [Function Call by Name in Golang](http://www.mikespook.com/2012/07/%e5%9c%a8-golang-%e4%b8%ad%e7%94%a8%e5%90%8d%e5%ad%97%e8%b0%83%e7%94%a8%e5%87%bd%e6%95%b0/) + * [Golang: Funny Play with Channel](http://www.mikespook.com/2012/06/golang-channel-%e6%9c%89%e8%b6%a3%e7%9a%84%e5%ba%94%e7%94%a8/) + * [Using MyMySQL - A interface of database/sql](http://www.mikespook.com/2012/05/mymysql-%e7%9a%84-databasesql-%e6%8e%a5%e5%8f%a3%e4%bd%bf%e7%94%a8/) + * [Go did What on the Stack?](http://www.mikespook.com/2011/03/go%e5%9c%a8stack%e4%b8%8a%e5%b9%b2%e4%ba%86%e7%a5%9e%e9%a9%ac%ef%bc%9f/) + * [Gobs on the wire (Translation)](http://www.mikespook.com/2011/03/%e7%bf%bb%e8%af%91%e9%a3%9e%e7%bf%94%e7%9a%84-gob/) + * [Go Environment Setup (Translation)](http://www.mikespook.com/2012/02/%E7%BF%BB%E8%AF%91go-%E7%8E%AF%E5%A2%83%E8%AE%BE%E7%BD%AE/) + * [Error Handling and Go (Translation)](http://www.mikespook.com/2011/08/%E9%94%99%E8%AF%AF%E5%A4%84%E7%90%86%E5%92%8Cgo/) + * [The Go Tool (Translation)](http://www.mikespook.com/2012/02/%E7%BF%BB%E8%AF%91go-%E5%B7%A5%E5%85%B7/) + * [Less is exponentially more (Translation)](http://www.mikespook.com/2012/06/%E7%BF%BB%E8%AF%91%E5%B0%91%E6%98%AF%E6%8C%87%E6%95%B0%E7%BA%A7%E7%9A%84%E5%A4%9A/) + * [Zero Downtime upgrades of TCP servers in Go (Translation)](http://www.mikespook.com/2012/05/%E7%BF%BB%E8%AF%91%E7%94%A8-go-%E5%AE%9E%E7%8E%B0%E9%9B%B6%E5%81%9C%E6%9C%BA%E5%8D%87%E7%BA%A7-tcp-%E6%9C%8D%E5%8A%A1/) + * [雨痕的Go语言学习笔记](https://github.com/qyuhen/book/raw/master/Go%20%E5%AD%A6%E4%B9%A0%E7%AC%94%E8%AE%B0.pdf) + * [Ready? Go! 上篇:大道至简](http://monnand.me/p/ready-go-1/zhCN/) + * [Ready? Go! 下篇:多核并起](http://monnand.me/p/ready-go-2/zhCN/) + +# Czech + * [Google Go - 1st birthday](http://www.abclinuxu.cz/clanky/google-go-1.-narozeniny) + * [Google Go - what we find in the kit](http://www.abclinuxu.cz/clanky/google-go-co-najdeme-ve-stavebnici) + * [Google Go - advanced topics](http://www.abclinuxu.cz/clanky/google-go-pokrocilejsi-temata) + * [Google Go by examples I.](http://www.abclinuxu.cz/clanky/google-go-v-prikladech-1) + * [Google Go by examples II.](http://www.abclinuxu.cz/clanky/google-go-v-prikladech-2) + * [Error handling in Go](http://www.abclinuxu.cz/clanky/osetrovani-chyb-v-go) + * [Google Go - The Laws of Reflection](http://www.abclinuxu.cz/clanky/google-go-pravidla-reflexe) + * [Google Go - 2nd birthday](http://www.abclinuxu.cz/clanky/google-go-2.-narozeniny) + +# German + * [Go Cheat Sheet - Kurzreferenz für GoLang](http://www.weltchecker.de/go-cheat-sheet-kurzreferenz-fur-golang/) _2011-02-25_ + * [Programmiersprachen im Multicore Zeitalter - Google GO und Nebenläufigkeit](http://ps.informatik.uni-siegen.de/downloads/Seminare/multicore-ws2011/donner.pdf) ` [PDF] ` _2012-02-02_ + * [A list of German press articles about Go](http://www.hweidner.de/redmine/projects/pub/wiki/Golang_Presse) + +# Japanese + * [WindowsでGo言語のまとめ](http://esten.wankuma.com/) + * [Websocketを使ってみた with Go言語](http://u.hinoichi.net/2012/12/14/websocket%E3%82%92%E4%BD%BF%E3%81%A3%E3%81%A6%E3%81%BF%E3%81%9F-with-go%E8%A8%80%E8%AA%9E/) + * [方向のあるチャネルを試す@Go言語](http://u.hinoichi.net/2012/12/29/%E6%96%B9%E5%90%91%E3%81%AE%E3%81%82%E3%82%8B%E3%83%81%E3%83%A3%E3%83%8D%E3%83%AB%E3%82%92%E8%A9%A6%E3%81%99-go%E8%A8%80%E8%AA%9E/) + * [Go言語のチャネルを使った簡単なサンプル -タイムアウト処理-](http://u.hinoichi.net/2012/12/26/go%E8%A8%80%E8%AA%9E%E3%81%AE%E3%83%81%E3%83%A3%E3%83%8D%E3%83%AB%E3%82%92%E4%BD%BF%E3%81%A3%E3%81%9F%E7%B0%A1%E5%8D%98%E3%81%AA%E3%82%B5%E3%83%B3%E3%83%97%E3%83%AB-%E3%82%BF%E3%82%A4%E3%83%A0/) + * [Go Playgroundでランダムを試す](http://u.hinoichi.net/2012/12/25/go-playground%E3%81%A7%E3%83%A9%E3%83%B3%E3%83%80%E3%83%A0%E3%82%92%E8%A9%A6%E3%81%99/) + * [golang and FastCGI](http://u.hinoichi.net/2012/07/11/golang-and-fastcgi/) + * [goweb-msgpack](http://u.hinoichi.net/2012/08/06/goweb-msgpack/) + * [GAE/Gで単体テスト](http://u.hinoichi.net/2012/08/17/gaeg%E3%81%A7%E5%8D%98%E4%BD%93%E3%83%86%E3%82%B9%E3%83%88/) + * [Go言語のコードカバレッジツール](http://u.hinoichi.net/2012/09/06/go%E8%A8%80%E8%AA%9E%E3%81%AE%E3%82%B3%E3%83%BC%E3%83%89%E3%82%AB%E3%83%90%E3%83%AC%E3%83%83%E3%82%B8%E3%83%84%E3%83%BC%E3%83%AB/) + * [Go言語でWebアプリを作るときに便利なライブラリ&ツール](http://u.hinoichi.net/2012/09/11/go%E8%A8%80%E8%AA%9E%E3%81%A7web%E3%82%A2%E3%83%97%E3%83%AA%E3%82%92%E4%BD%9C%E3%82%8B%E3%81%A8%E3%81%8D%E3%81%AB%E4%BE%BF%E5%88%A9%E3%81%AA%E3%83%A9%E3%82%A4%E3%83%96%E3%83%A9%E3%83%AA/) + * [Gowebでクロスドメインリクエスト](http://u.hinoichi.net/2012/09/24/goweb%E3%81%A7%E3%82%AF%E3%83%AD%E3%82%B9%E3%83%89%E3%83%A1%E3%82%A4%E3%83%B3%E3%83%AA%E3%82%AF%E3%82%A8%E3%82%B9%E3%83%88/) + * [Go言語のhttpサーバ上で外部ファイルとしてJavascriptとかCSSを使う](http://u.hinoichi.net/2012/05/21/go%E8%A8%80%E8%AA%9E%E3%81%AEhttp%E3%82%B5%E3%83%BC%E3%83%90%E4%B8%8A%E3%81%A7%E5%A4%96%E9%83%A8%E3%83%95%E3%82%A1%E3%82%A4%E3%83%AB%E3%81%A8%E3%81%97%E3%81%A6javascript%E3%81%A8%E3%81%8Bcss%E3%82%92/) + * [Go言語のテンプレートエンジンでHTMLのコメントを出す](http://u.hinoichi.net/2012/05/07/go%E8%A8%80%E8%AA%9E%E3%81%AE%E3%83%86%E3%83%B3%E3%83%97%E3%83%AC%E3%83%BC%E3%83%88%E3%82%A8%E3%83%B3%E3%82%B8%E3%83%B3%E3%81%A7html%E3%81%AE%E3%82%B3%E3%83%A1%E3%83%B3%E3%83%88%E3%82%92%E5%87%BA/) + * [Channel API for Golang](http://u.hinoichi.net/2012/02/23/channel-api-for-golang/) + * [Go言語で jQuery ライクな操作が出来る goquery を試した。](http://mattn.kaoriya.net/software/lang/go/20120914184828.htm) + * [Go言語向けの ORM、gorp がなかなか良い](http://mattn.kaoriya.net/software/lang/go/20120914222828.htm) + * [GAE/GでGoogle Cloud Storageを利用するには(1)](http://takashi-yokoyama.blogspot.jp/2012/08/gaeggoogle-cloud-storage.html) + * [Go言語のWebフレームワーク"goweb"をGAE/Gで動かす](http://takashi-yokoyama.blogspot.jp/2012/07/gowebgowebgaeg.html) + * [Ubuntu 12.04にgolangを”ソースから”インストールする。](http://takashi-yokoyama.blogspot.jp/2012/07/ubuntu-1204golang.html) + * [GAE/Gで時間のチェック(Datastore編)](http://takashi-yokoyama.blogspot.jp/2012/06/gaegdatastore.html) \ No newline at end of file diff --git a/Books.md b/Books.md new file mode 100644 index 00000000..b81947e9 --- /dev/null +++ b/Books.md @@ -0,0 +1,148 @@ +Sorted by publication date. + +# English + * **Go Programming** + * Author: John P. Baugh + * Publication Date: June 16, 2010 + * ISBN: 978-1453636671 + + * **The Way to Go: A Thorough Introduction to the Go Programming Language** + * Author: Ivo Balbaert + * Publication Date: March 8, 2012 + * ISBN: 978-1469769165 + + * **The Go Programming Language Phrasebook** + * Author: David Chisnall + * Publication Date: May 10, 2012 + * ISBN: 978-0321817143 + + * **Programming in Go: Creating Applications for the 21st Century** + * Author: Mark Summerfield + * Publication Date: May 14, 2012 + * ISBN: 978-0321774637 + + * **An Introduction to Programming in Go** + * Author: Caleb Doxsey + * Publication Date: September 3, 2012 + * ISBN: 978-1478355823 + * References: [site](http://www.golang-book.com/) + + * **Learning Go** (e-book) + * Author: Miek Gieben + * Publication Date: --- + * ISBN: --- + * References: [site](http://www.miek.nl/projects/learninggo/) + + * **Network Programming with Go** (e-book) + * Author: Jan Newmarch + * Publication Date: --- + * ISBN: --- + * References: [site](http://jan.newmarch.name/go/) + + * **Go In Action** + * Authors: Brian Ketelsen, Erik St. Martin, and William Kennedy + * Publication Date: Summer 2015 (est.) + * ISBN: 9781617291784 + * References: http://goinactionbook.com + * Discount Code 40% Off: gocenter + +# Chinese + * **Go语言·云动力** + * Author: 樊虹剑(fango) + * Publication Date: 2012-06 + * ISBN: 978-7-115-28307-8 + * Reference: http://www.ituring.com.cn/book/1040 + + * **Go语言编程** + * Author: 许式伟 + * Publication Date: 2012-08 + * ISBN: 978-7-115-29036-6 + * Reference: http://www.ituring.com.cn/book/967 + + * **Go Web编程** + * Author: 谢孟军 + * Publication Date: 2013-05 + * ISBN: 9787121200915 + * Reference: https://github.com/astaxie/build-web-application-with-golang/ + + * **Go语言程序设计(Programming in Go: Creating Applications for the 21st Century)** + * Author: Mark Summerfield + * Translator: 许式伟, 吕桂华, 徐立, 何李石 + * Publication Date: 2013-08 + * ISBN: 978-7-115-31790-2 + * Reference: http://www.ptpress.com.cn/Book.aspx?id=35714 + + * **Go语言程序设计(21世纪高等学校规划教材·计算机科学与技术)** + * Author: 王鹏 + * Publication Date: 2013-12-18 + * ISBN: 9787302347231 + * Reference: http://www.tup.com.cn/sub_press/4/book/Showbook.asp?CPBH=054436-01 + + * **学习 Go 语言** (e-book / Translation) + * Author: Xing Xing (mikespook) + * Publication Date: --- + * ISBN: --- + * References: [site](http://www.mikespook.com/learning-go/) + +# Japanese + * **はじめての「Go言語」** + * Author: 茨木 隆彰 + * Publication Date: 2010-11 + * ISBN: 978-4777515592 + * Reference: + + * **Go言語プログラミング入門on Google App Engine** + * Author: 横山 隆司 + * Publication Date: 2011-12 + * ISBN: 978-4798031804 + * Reference: + + * **はじめてのGoogle App Engine Go言語編** + * Author: 茨木 隆彰 + * Publication Date: 2012-2 + * ISBN: 978-4777516605 + * Reference: + + * **プログラミング言語Goフレーズブック** + * Author: David Chisnall (著), デイビッド・チズナール (著), 柴田 芳樹 (翻訳) + * Publication Date: 2012-10 + * ISBN: 978-4864010962 + * Reference: + + * **基礎からわかる Go言語** + * Author: 古川 昇 + * Publication Date: 2012-11 + * ISBN: 978-4863541177 + * Reference: + +# German + * **Programmierung in Google Go** (e-book) + * Authors: Rainer Feike and Steffen Blass + * ISBN: 978-3-8632-4722-5 + * Publication Date: 2010-11 + * Reference: http://bookshop.pearson.de/main/main.asp?page=bookdetails&productid=181679 + + * **Systemprogrammierung in Google Go** + * Author: Frank Müller + * Publication Date: 2011-01 + * ISBN: 978-3-89864-712-0 + * Reference: http://dpunkt.de/buecher/3449/systemprogrammierung-in-google-go.html + + * **Nichtsequentielle Programmierung mit Go 1** (2nd edition) (available as print and e-book) + * Author: Christian Maurer + * Publication Date: 2012 + * ISBN: 978-3-642-29968-1 + * Reference: http://www.springer.com/computer/swe/book/978-3-642-29968-1 + + * **Einstieg in Google Go** (e-book) + * Author: Christian Himpel and Mario Deilmann + * Publication Date: 2012-04 + * ISBN: 978-3-86802-415-9 + * Reference: http://entwickler.de/press/Einstieg-in-Google-Go + +# Brazilian Portuguese + * **Programando em Go: crie aplicações com a linguagem do Google** + * Author: Caio Filipini + * Publication Date: 2014-07-01 + * ISBN: 978-85-66250-49-7 + * Reference: http://www.casadocodigo.com.br/products/livro-google-go \ No newline at end of file diff --git a/BoundingResourceUse.md b/BoundingResourceUse.md new file mode 100644 index 00000000..dc78332a --- /dev/null +++ b/BoundingResourceUse.md @@ -0,0 +1,28 @@ +# Bounding resource use + +To bound a program's use of a limited resource, like memory, have goroutines synchronize their use of that resource using a buffered channel (i.e., use the channel as a semaphore): +``` +const ( + AvailableMemory = 10 << 20 // 10 MB + AverageMemoryPerRequest = 10 << 10 // 10 KB + MaxOutstanding = AvailableMemory / AverageMemoryPerRequest +) +var sem = make(chan int, MaxOutstanding) + +func Serve(queue chan *Request) { + for { + sem <- 1 // Block until there's capacity to process a request. + req := <-queue + go handle(req) // Don't wait for handle to finish. + } +} + +func handle(r *Request) { + process(r) // May take a long time & use a lot of memory or CPU + <-sem // Done; enable next request to run. +} +``` + +## References + +Effective Go's discussion of channels: http://golang.org/doc/effective_go.html#channels \ No newline at end of file diff --git a/ChromeOS.md b/ChromeOS.md new file mode 100644 index 00000000..d8857229 --- /dev/null +++ b/ChromeOS.md @@ -0,0 +1,34 @@ +# Introduction +This tutorial will show you how to install/build/run go on chrome OS. I have tested this using a chrome book Pixel however i do not have any other types of chrome books. However this should work as long as you install the corresponding Linux package for your processor. + +# Requirements +Your chrome book must be in developer mode for this to work. Also please note this has only been tested on a 64gb LTE Pixel however it should work on other chrome books + +# Install Go +First download the latest version of Go for Linux-amd64 from the [Go Downloads page](https://code.google.com/p/go/downloads/list) after that open a shell by hitting (Crtl+alt+t) and typing in "shell" then hit enter. Then extract it using the following command.``` +sudo tar -C /usr/local -xzf ~/Downloads/FILENAMEHERE``` Go should now be installed you can test this by typing "/usr/local/go/bin/go" if it installed you should see the go help prompt. Congrats Go is now installed however you will not be able to run anything because chrome mounts partitions with noexec. The following will guide you through remounting your home folder, and setting up paths that are persistent across reboots, and shell sessions. + +# Create a Workspace +To keep this simple just create a folder called "gocode" in your downloads folder. Also create a folder called "src" inside. + +# Set Paths & Exec +Either type the following into your shell each session or if you want it to be persistent between sessions add it to your "~/.bashrc" file. The last line remounts your user folder so that you can run your go code other wise you would get permission errors. +``` + +export PATH=$PATH:/usr/local/go/bin +export GOPATH=~/Downloads/gocode +export PATH=$PATH:$GOPATH/bin +sudo mount -i -o remount,exec /home/chronos/user/ +``` +This will allow you to run your go object files in your shell. + +# Test If It Worked +First add a "hello" folder inside of your "gocode/src" folder. After that create a file in your "gocode/src/hello" folder called "hello.go" with the following in it. Then run "go install hello" then "hello" and you should see "Hello, chrome os" in the console. +``` +package main + +import "fmt" + +func main() { +fmt.Printf("Hello, chrome os\n") +}``` \ No newline at end of file diff --git a/CodeReview.md b/CodeReview.md new file mode 100644 index 00000000..b4f44f75 --- /dev/null +++ b/CodeReview.md @@ -0,0 +1,104 @@ +Be sure to familiarize yourself with the [code review process](http://golang.org/doc/contribute.html#Code_review) from the official Contribution Guidelines first. + +# Reviewer Parlance + +There are several terms code reviews may use that you should become familiar with. + + * ` LGTM ` — looks good to me: the reviewer approves of your changes as they currently are. The reviewer may suggest minor changes; if so, you can make those changes, and then submit. + * ` NOT LGTM ` — does not look good to me: the reviewer disapproves of your changes entirely. The reviewer will explain why they disapprove of your changes. + * ` SGTM ` — sounds good to me: the reviewer approves of an idea mentioned in the review, but does not approve the changes for commit at this point. + * ` s/foo/bar/ ` — The reviewer has requested that you replace the text ` foo ` with ` bar ` where they have commented. This notation originates from [sed syntax](http://en.wikipedia.org/wiki/Sed#Usage). + * ` s/foo/bar/g ` — The reviewer has requested that you replace the text ` foo ` with ` bar ` throughout your entire change. This notation originates from [sed syntax](http://en.wikipedia.org/wiki/Sed#Usage). + * ` CC=person ` — The reviewer has requested that ` person ` receive a copy of this review. This often originates from the [Go development dashboard](http://go-dev.appspot.com/). + * ` R=person ` — The reviewer has requested for ` person ` to review this code before it is committed. This often originates from the [Go development dashboard](http://go-dev.appspot.com/). + * ` R=close ` — The reviewer has requested that you close the review for now. They will explain why they wish for you to close the review. + * ` TBR=person ` — This does not appear in code reviews themselves, but may appear in commit messages. In this case, the committer has requested that ` person ` review this code as soon as possible, but the change is considered acceptable to be committed immediately. + +# Email + +Messages from a code review are typically sent to three places: + * the review itself + * the golang-codereviews group + * email + +If you are replying to a review comment through email or the golang-codereviews group, you will notice two extra email addresses - golang-codereviews@googlegroups.com and reply@codereview-hr.appspotmail.com. The former address ensures your message is posted to the golang-codereviews group, and the latter ensures your message is posted back to the review itself. Keeping both of these on your replies makes sure your review message is visible everywhere. + +# Code Review on Windows + +The code review extension depends on Python modules that are not currently included in the standalone Mercurial installer for Windows. Attempting to use the code review extension will result in a "` *** failed to import extension codereview `" error. + +## Option 1: Source Installation + +To ensure that your Mercurial installation is compatible with the code review plugin, the "source install" package should be used instead of the standalone installer. The process to do this is as follows: + + * Check the Mercurial download page to determine the required Python version. + * Install Python using the Windows installer from the Python download page. + * Install Mercurial using the "Mercurial X.XX for Python X.X on Windows (source install)" installer from the Mercurial download page. + * Update your ` PATH ` to include the Python installation directory and its ` scripts ` subdirectory. + +## Option 2: Standalone Installation + +If you would rather use the standalone Mercurial installer, it is possible to add the missing modules after completing the installation. You will need to copy files from the ` lib ` directory of an existing Python installation to the root directory of the ` library.zip ` file in the Mercurial installation directory. Depending on the version of Mercurial you have installed, the following files/directories may be needed: + + * the ` json/ ` subdirectory + * ` htmlentitydefs.py ` + * ` HTMLParser.py ` + * ` markupbase.py ` + +# Dealing with Conflicts + +When I run ` hg clpatch NNNN `, I get "patch and recent changes conflict". What do I do? + +## Option 1: clpatch the old revision, use hg to merge + +``` +hg clp NNNN +# look at the revision that CL is against; call that revision AAAA +hg up AAAA +hg clp --no_incoming NNNN +hg up +# fix the merge conflicts, if any +# optionally, upload the merged revision: +hg upl NNNN +``` + +## Option 2: Apply the diff from the codereview website + +Visit ` https://codereview.appspot.com/NNNN/ ` and note the raw diff url. It'll likely be something like ` https://codereview.appspot.com/download/issueNNNN_X0001.diff `. + +``` +# clpatch to bring in the CL metadata +hg clpatch --ignore_hgapplydiff_failure NNNN +# apply the diff +hg import --no-commit --force DIFF_URL +# fix the tree +# optionally, upload the merged revision: +hg upl NNNN +``` + +# Reverting local changes + +You've run ` hg clpatch NNNN `, and you want to restore your repo to a clean state. + +``` +# Revert file changes. +hg revert @NNNN +# Remove local CL metadata. +hg change -D NNNN +# Remove added files. DANGER: Will delete *all* untracked files. +hg purge +``` + +# Submitting + +If you were just given submit access, congrats. Some tips: + + * To check that you do in fact have submit access, go to any issue and click to enter a comment. If you have submit access, you'll notice a lot of extra options available beyond just commenting. + * To submit, you'll need to configure mercurial to authorize with code.google.com. You can do this via the ` .hgrc ` auth section. Sample: +``` +[auth] +go.prefix = https://code.google.com/p/go +go.username = *****@****.com +go.password = ********** +``` + * By default, the password used for code.google.com is **not** your regular Google account password; visit https://code.google.com/hosting/settings. \ No newline at end of file diff --git a/CodeReviewComments.md b/CodeReviewComments.md new file mode 100644 index 00000000..49c23449 --- /dev/null +++ b/CodeReviewComments.md @@ -0,0 +1,255 @@ +(TODO: Add table of contents.) + +# Go Code Review Comments + +This page collects common comments made during reviews of Go code, so +that a single detailed explanation can be referred to by shorthands. +This is a laundry list of common mistakes, not a style guide. + +You can view this as a supplement to http://golang.org/doc/effective_go.html. + +**Please discuss changes before editing this page**, even _minor_ ones. Many people have opinions and this is not the place for edit wars. + +## gofmt + +Run [gofmt](http://golang.org/cmd/gofmt/) on your code to automatically fix the majority of mechanical style issues. Almost all Go code in the wild uses ` gofmt `. The rest of this document addresses non-mechanical style points. + +An alternative is to use [goimports](https://godoc.org/code.google.com/p/go.tools/cmd/goimports), a superset of ` gofmt ` which additionally adds (and removes) import lines as necessary. + +## Comment Sentences + +See http://golang.org/doc/effective_go.html#commentary. Comments documenting declarations should be full sentences, even if that seems a little redundant. This approach makes them format well when extracted into godoc documentation. Comments should begin with the name of the thing being described and end in a period: + +``` +// A Request represents a request to run a command. +type Request struct { ... + +// Encode writes the JSON encoding of req to w. +func Encode(w io.Writer, req *Request) { ... +``` + +and so on. + +## Doc Comments + +All top-level, exported names should have doc comments, as should non-trivial unexported type or function declarations. See http://golang.org/doc/effective_go.html#commentary for more information about commentary conventions. + +## Don't Panic + +See http://golang.org/doc/effective_go.html#errors. Don't use panic for normal error handling. Use error and multiple return values. + +## Error Strings + +Error strings should not be capitalized (unless beginning with proper nouns or acronyms) or end with punctuation, since they are usually printed following other context. That is, use fmt.Errorf("something bad") not fmt.Errorf("Something bad"), so that log.Print("Reading %s: %v", filename, err) formats without a spurious capital letter mid-message. This does not apply to logging, which is implicitly line-oriented and not combined inside other messages. + +## Handle Errors + +See http://golang.org/doc/effective_go.html#errors. Do not discard errors using ` _ ` variables. If a function returns an error, check it to make sure the function succeeded. Handle the error, return it, or, in truly exceptional situations, panic. + +## Imports + +Imports are organized in groups, with blank lines between them. The standard library packages are in the first group. + +``` +package main + +import ( + "fmt" + "hash/adler32" + "os" + + "appengine/user" + "appengine/foo" + + "code.google.com/p/x/y" + "github.com/foo/bar" +) +``` + +goimports will do this for you. + +## Import Dot + +The import . form can be useful in tests that, due to circular dependencies, cannot be made part of the package being tested: + +``` +package foo_test + +import ( + . "foo" + "bar/testutil" // also imports "foo" +) +``` + +In this case, the test file cannot be in package foo because it uses bar/testutil, which imports foo. So we use the 'import .' form to let the file pretend to be part of package foo even though it is not. Except for this one case, do not use import . in your programs. It makes the programs much harder to read because it is unclear whether a name like Quux is a top-level identifier in the current package or in an imported package. + +## Indent Error Flow + +Try to keep the normal code path at a minimal indentation, and indent the error handling, dealing with it first. This improves the readability of the code by permitting visually scanning the normal path quickly. For instance, don't write + +``` +if err != nil { + // error handling +} else { + // normal code +} +``` + +Instead, write + +``` +if err != nil { + // error handling + return // or continue, etc. +} +// normal code +``` + +If the if statement has an initialization statement that, such as + +``` +if x, err := f(); err != nil { + // error handling + return +} else { + // use x +} +``` + +then this may require moving the short variable declaration to its own line: + +``` +x, err := f() +if err != nil { + // error handling + return +} +// use x +``` + +## Initialisms + +Words in names that are initialisms or acronyms (e.g. "URL" or "NATO") have a consistent case. For example, "URL" should appear as "URL" or "url" (as in "urlPony", or "URLPony"), never as "Url". Here's an example: ServeHTTP not ServeHttp. + +This rule also applies to "ID" when it is short for "identifier," so write "appID" instead of "appId". + +Code generated by the protocol buffer compiler is exempt from this rule. Human-written code is held to a higher standard than machine-written code. + +## Line Length + +There is no rigid line length limit in Go code, but avoid uncomfortably long lines. Similarly, don't add line breaks to keep lines short when they are more readable long--for example, if they are repetitive. + +Comments are typically wrapped before no more than 80 characters, not because it's a rule, but because it's more readable when viewing in an editor that might be sized to show hundreds of columns wide. Humans are better at following narrow text (e.g. columns in a newspaper) than giant walls of wide text, as a wide editor might show. Regardless, godoc should render it nicely either way. + +## Mixed Caps + +See http://golang.org/doc/effective_go.html#mixed-caps. This applies even when it breaks conventions in other languages. For example an unexported constant is ` maxLength ` not ` MaxLength ` or ` MAX_LENGTH `. + +## Named Result Parameters + +Consider what it will look like in godoc. Named result parameters like: + +``` +func (n *Node) Parent1() (node *Node) +func (n *Node) Parent2() (node *Node, err error) +``` +will stutter in godoc; better to use: +``` +func (n *Node) Parent1() *Node +func (n *Node) Parent2() (*Node, error) +``` + +On the other hand, if a function returns two or three parameters of the same type, or if the meaning of a result isn't clear from context, adding names may be useful. For example: + +```go + +func (f *Foo) Location() (float64, float64, error)``` +is less clear than +```go + +// Location returns f's latitude and longitude. +// Negative values mean south and west, respectively. +func (f *Foo) Location() (lat, long float64, err error)``` + +Naked returns are okay if the function is a handful of lines. Once it's a medium-sized function, be explicit with your return values. Corollary: it's not worth it to name result parameters just because it enables you to use naked returns. Clarity of docs is always more important than saving a line or two in your function. + +Finally, in some cases you need to name a result parameter in order to change it in a deferred closure. That is always okay. + +## Naked Returns + +See [CodeReviewComments#Named\_Result\_Parameters](wiki/CodeReviewComments#Named_Result_Parameters). + +## Package Comments + +Package comments, like all comments to be presented by godoc, must appear adjacent to the package clause, with no blank line. + +``` +// Package math provides basic constants and mathematical functions. +package math +``` + +``` +/* +Package template implements data-driven templates for generating textual +output such as HTML. +.... +*/ +package template +``` + +See http://golang.org/doc/effective_go.html#commentary for more information about commentary conventions. + +## Package Names + +All references to names in your package will be done using the package name, so you can omit that name from the identifiers. For example, if you are in package chubby, you don't need type ChubbyFile, which clients will write as chubby.ChubbyFile. Instead, name the type File, which clients will write as chubby.File. See http://golang.org/doc/effective_go.html#package-names for more. + +## Pass Values + +Don't pass pointers as function arguments just to save a few bytes. If a function refers to its argument ` x ` only as ` *x ` throughout, then the argument shouldn't be a pointer. Common instances of this include passing a pointer to a string (` *string `) or a pointer to an interface value (` *io.Reader `). In both cases the value itself is a fixed size and can be passed directly. This advice does not apply to large structs, or even small structs that might grow. + +## Receiver Names + +The name of a method's receiver should be a reflection of its identity; often a one or two letter abbreviation of its type suffices (such as "c" or "cl" for "Client"). Don't use generic names such as "me", "this" or "self", identifiers typical of object-oriented languages that place more emphasis on methods as opposed to functions. The name need not be as descriptive as a that of a method argument, as its role is obvious and serves no documentary purpose. It can be very short as it will appear on almost every line of every method of the type; familiarity admits brevity. Be consistent, too: if you call the receiver "c" in one method, don't call it "cl" in another. + +## Receiver Type + +Choosing whether to use a value or pointer receiver on methods can be difficult, especially to new Go programmers. If in doubt, use a pointer, but there are times when a value receiver makes sense, usually for reasons of efficiency, such as for small unchanging structs or values of basic type. Some rules of thumb: + + * If the receiver is a map, func or chan, don't use a pointer to it. + * If the receiver is a slice and the method doesn't reslice or reallocate the slice, don't use a pointer to it. + * If the method needs to mutate the receiver, the receiver must be a pointer. + * If the receiver is a struct that contains a sync.Mutex or similar synchronizing field, the receiver must be a pointer to avoid copying. + * If the receiver is a large struct or array, a pointer receiver is more efficient. How large is large? Assume it's equivalent to passing all its elements as arguments to the method. If that feels too large, it's also too large for the receiver. + * Can function or methods, either concurrently or when called from this method, be mutating the receiver? A value type creates a copy of the receiver when the method is invoked, so outside updates will not be applied to this receiver. If changes must be visible in the original receiver, the receiver must be a pointer. + * If the receiver is a struct, array or slice and any of its elements is a pointer to something that might be mutating, prefer a pointer receiver, as it will make the intention more clear to the reader. + * If the receiver is a small array or struct that is naturally a value type (for instance, something like the time.Time type), with no mutable fields and no pointers, or is just a simple basic type such as int or string, a value receiver makes sense. A value receiver can reduce the amount of garbage that can be generated; if a value is passed to a value method, an on-stack copy can be used instead of allocating on the heap. (The compiler tries to be smart about avoiding this allocation, but it can't always succeed.) Don't choose a value receiver type for this reason without profiling first. + * Finally, when in doubt, use a pointer receiver. + +## Useful Test Failures + +Tests should fail with helpful messages saying what was wrong, with what inputs, what was actually got, and what was expected. It may be tempting to write a bunch of assertFoo helpers, but be sure your helpers produce useful error messages. Assume that the person debugging your failing test is not you, and is not your team. A typical Go test fails like: + +``` + if got != tt.want { + t.Errorf("Foo(%q) = %d; want %d", tt.in, got, tt.want) // or Fatalf, if test can't test anything more past this point + } +``` + +Note that the order here is actual != expected, and the message uses that order too. Some test frameworks encourage writing these backwards: 0 != x, "expected 0, got x", and so on. Go does not. + +If that seems like a lot of typing, you may want to write a table-driven test: http://code.google.com/p/go-wiki/wiki/TableDrivenTests + +Another common technique to disambiguate failing tests when using a test helper with different input is to wrap each caller with a different TestFoo function, so the test fails with that name: + +``` + func TestSingleValue(t *testing.T) { testHelper(t, []int{80}) } + func TestNoValues(t *testing.T) { testHelper(t, []int{}) } +``` + +In any case, the onus is on you to fail with a helpful message to whoever's debugging your code in the future. + +## Variable Names + +Variable names in Go should be short rather than long. This is especially true for local variables with limited scope. Prefer c to lineCount. Prefer i to sliceIndex. + +The basic rule: the further from its declaration that a name is used, the more descriptive the name must be. For a method receiver, one or two letters is sufficient. Common variables such as loop indices and readers can be a single letter (` i `, ` r `). More unusual things and global variables need more descriptive names. \ No newline at end of file diff --git a/Comments.md b/Comments.md new file mode 100644 index 00000000..f871ddd0 --- /dev/null +++ b/Comments.md @@ -0,0 +1,23 @@ +# Comments + +Every package should have a package comment. It should immediately precede the ` package ` statement in one of the files in the package. (It only needs to appear in one file.) It should begin with a single sentence that begins "Package _packagename_" and give a concise summary of the package functionality. This introductory sentence will be used in godoc's list of all packages. + +Subsequent sentences and/or paragraphs can give more details. Sentences should be properly punctuated. + +``` +// Package superman implements methods for saving the world. +// +// Experience has shown that a small number of procedures can prove +// helpful when attempting to save the world. +package superman +``` + +Nearly every top-level type, const, var and func should have a comment. A comment for bar should be in the form "_bar_ floats on high o'er vales and hills.". The first letter of _bar_ should not be capitalized unless it's capitalized in the code. + +``` +// enterOrbit causes Superman to fly into low Earth orbit, a position +// that presents several possibilities for planet salvation. +func enterOrbit() os.Error { + ... +} +``` \ No newline at end of file diff --git a/CommonMistakes.md b/CommonMistakes.md new file mode 100644 index 00000000..076da07e --- /dev/null +++ b/CommonMistakes.md @@ -0,0 +1,58 @@ +(TODO: Add table of contents.) + +# Introduction + +When new programmers start using Go or when old Go programmers start using a new concept, there are some common mistakes that many of them make. Here is a non-exhaustive list of some frequent mistakes that show up on the mailing lists and in IRC. + +# Closures + +## Using Closures with Goroutines + +When iterating in Go, one might also be tempted to use a closure and goroutine to process data in parallel. For example, if you wanted to process values coming in from a channel in their own goroutines, you might write the following code: +``` +for val := range values { + go func() { + fmt.Println(val) + }() +} +``` + +If you don't immediately see the problem with the above code, take a second to see if you can figure out what is wrong with it before you keep reading. + +The ` val ` variable in the above loop is actually a single variable that takes on the value of each slice element. Because the closures are all only bound to that one variable, there is a very good chance that when you run this code you will see the last element printed for every iteration instead of each value in sequence, because the goroutines will probably not begin executing until after the loop. + +The proper way to write that loop is: +``` +for val := range values { + go func(val interface{}) { + fmt.Println(val) + }(val) +} +``` + +By adding val as a parameter to the closure, ` val ` is evaluated at each iteration and placed on the stack for the goroutine, so each slice element is available to the goroutine when it is eventually executed. + +It is also important to note that variables declared within the body of a loop are not shared between iterations, and thus can be used separately in a closure. The following code uses a common index variable ` i ` to create separate ` val `s, which results in the expected behavior: + +``` +for i := range valslice { + val := valslice[i] + go func() { + fmt.Println(val) + }() +} +``` + +Note that without executing this closure as a goroutine, the code runs as expected. The following example prints out the integers between 1 and 10. + +``` +for i := 1; i <= 10; i++ { + func() { + fmt.Println(i) + }() +} +``` + +Even though the closures all still close over the same variable (in this case, ` i `), they are executed before the variable changes, resulting in the desired behavior. + +http://golang.org/doc/go_faq.html#closures_and_goroutines \ No newline at end of file diff --git a/Contributing.md b/Contributing.md new file mode 100644 index 00000000..c14edd27 --- /dev/null +++ b/Contributing.md @@ -0,0 +1,5 @@ +# Permissions + +Only members of the go-wiki project may edit these wiki pages (this is to keep the number of spammers down). + +To join the project, please mail adg@golang.org and request permission. \ No newline at end of file diff --git a/Courses.md b/Courses.md new file mode 100644 index 00000000..4a3f1bb9 --- /dev/null +++ b/Courses.md @@ -0,0 +1,44 @@ +# Introduction + +Go is a great langage for CS majors. This page presents some university courses that uses Go. + +# Language + + * University of Helsinki, Department of Computer Science used to have a course named Introduction to Go, taught by K. Bäckman: http://www.cs.helsinki.fi/courses/582336 in Spring 2010. + * University of Sofia "St. Kliment Ohridski", Faculty of Mathematics and Informatics has elective course named "Programming with Go", taught by K. Vladimiroff: http://fmi.golang.bg (bulgarian) and their [[public lectures](https://github.com/fmi/go-lectures)] (also in bulgarian) + * Free University of Berlin (Germany) had a course [Introduction to Go Programming](http://w3.inf.fu-berlin.de/lehre/WS12/go/) in Spring 2013. + +# Web + + * CS 4830: Science and Engineering of the WWW taught by Ryanne Dolan at University of Missouri: http://4830.ryannedolan.info/ + + +# Concurrency + + * Go is being used at the end of a yearlong freshman computer science class at KTH: http://www.nada.kth.se/~snilsson/concurrency/. + + * Go, Concurrent and Systems Programming from Rochester Institute of Technology: http://www.cs.rit.edu/~ats/go-2011-2/index.xml + + * Free University of Berlin (Germany) had a course on [Concurrent Programming](http://w3.inf.fu-berlin.de/lehre/SS13/alp4/) with Go as a reference language in 2013. + + * University of Duisburg-Essen (Germany) had a lecture about Go and CSP within their course on [Concurrent systems modelling](http://www.ti.inf.uni-due.de/teaching/ss2014/mod_ns/) in summer 2014. [[Slides](http://www.ti.inf.uni-due.de/fileadmin/public/teaching/mod_ns/folien/SS2014/google-go-2x2.pdf)] + +# Distributed Computing + + * Distributed Systems course (15-440) at CMU: http://www.cs.cmu.edu/~dga/15-440/F12/index.html (see also http://da-data.blogspot.se/2013/02/teaching-distributed-systems-in-go.html) + + * 6.824 Distributed Systems at MIT is using Go in its labs: http://pdos.csail.mit.edu/6.824/. + + * Design of Agent-based Systems at University of Jyväskylä: [TIES433](http://users.jyu.fi/~miselico/teaching/TIES433/2013/) + + * CSE 223B, Spring 2014: Distributed Computing and Systems at UC San Diego http://cseweb.ucsd.edu/classes/sp14/cse223B-a/index.html + + * Dixie State University teaches Go in an introductory course to programming languages and later on in distributed systems. + + * CS 352, Computer Organization and Design, at the University of Wisconsin, Eau Claire: http://cs.uwec.edu/~buipj/teaching/cs.352.f13/lab_01_high_performance_computing.html + + * KTH Stockholm uses Go to teach concurrency: http://www.nada.kth.se/~snilsson/concurrency/ + + * Go was used this fall at the University of Tromsø: INF-2202 Concurrent and System Level Programming http://uit.no/studietilbud/emner/emne?p_document_id=330794 + + * Norwegian University of Science and Technology: TTK4145 Real-Time Programming http://www.itk.ntnu.no/fag/TTK4145/information/ \ No newline at end of file diff --git a/DashboardBuilders.md b/DashboardBuilders.md new file mode 100644 index 00000000..ff747897 --- /dev/null +++ b/DashboardBuilders.md @@ -0,0 +1,74 @@ +# Introduction + +This page lists details of the various builders assigned to the build.golang.org CI system + +## New-style Builders + +See http://golang.org/s/builderplan + +| **title** | **description** | **owner** | **notes** | +|:----------|:----------------|:----------|:----------| +| linux-386 | in Docker on GCE | bradfitz | | +| linux-386-387 | in Docker on GCE | bradfitz | GO386=387 | +| linux-386-clang | in Docker on GCE | bradfitz | Debian wheezy + clang 3.5 instead of gcc | +| linux-386-sid | in Docker on GCE | bradfitz | Debian sid | +| linux-amd64 | in Docker on GCE | bradfitz | | +| linux-amd64-clang | in Docker on GCE | bradfitz | Debian wheezy + clang 3.5 instead of gcc | +| linux-amd64-nocgo | in Docker on GCE | bradfitz | cgo disabled | +| linux-amd64-noopt | in Docker on GCE | bradfitz | optimizations and inlining disabled | +| linux-amd64-race| in Docker on GCE | bradfitz | | +| linux-amd64-sid | in Docker on GCE | bradfitz | Debian sid | +| nacl-386 | in Docker on GCE | bradfitz | | +| nacl-amd64p32 | in Docker on GCE | bradfitz | | + +## Legacy Builders + +These builders are configured and run manually. The goal is to migrate as many as possible over to the new system. +| **title** | **description** | **owner** | **notes** | +|:----------|:----------------|:----------|:----------| +| darwin-amd64 | 2011 Mac Mini, 2.4Ghz Core i5 | adg | Mac OS X 10.6 (10K549) | +| darwin-amd64-cheney | 2011 Mac Mini, 2.4Ghz Core i5 | Dave Cheney | Mac OS X 10.10 XCode 5 | +| darwin-amd64-race-cheney | 2011 Mac Mini, 2.4Ghz Core i5 | Dave Cheney | Mac OS X 10.10 XCode 5 | +| darwin-386 | 2011 Mac Mini, 2.4Ghz Core i5 | adg | Mac OS X 10.6 (10K549) | +| darwin-386-cheney | 2011 Mac Mini, 2.4Ghz Core i5 | Dave Cheney | Mac OS X 10.10 XCode 5 | +| dragonfly-amd64 | ? | Justin Sherrill | ? | +| dragonfly-386 | ? | Justin Sherrill | ? | +| freebsd-386 | rootbsd.net VPS | adg | FreeBSD 9.1 | +| freebsd-amd64 | rootbsd.net VPS | adg | FreeBSD 9.1 | +| freebsd-amd64-race | rootbsd.net VPS | adg | FreeBSD 9.2, Only runs -race tests (./race.bash) | +| linux-arm-luitvd | RaspberryPi | Luit van Drongelen | | +| linux-arm-arm5 | QNAP TS-119P, ARMv5 @ 2.0GHz, 512MB | Dave Cheney | GOARM=5 | +| linux-arm-cheney-imx6 | Solidrun Cubox-i, quad core Cortex-A9 ~ 1Ghz, 2Gb ram | Dave Cheney | Runs arch linux, iMX6 boards need 3.10.x or above to pass the build reliably | +| nacl-arm | samsung chromebook | rsc | running chrubuntu | +| nacl-arm-cheney | same builder as linux-arm-cheney-imx6 | Dave Cheney | | +| openbsd-386-rootbsd | VM on RootBSD | adg | OpenBSD 5.4-current | +| openbsd-386-crawshaw | VM | crawshaw | OpenBSD 5.5 | +| openbsd-amd64-rootbsd | VM on RootBSD | adg | OpenBSD 5.4-current | +| netbsd-386-minux | KVM | Shenghou Ma | | +| netbsd-amd64-bsiegert | EC2 m1.small VM | Benny Siegert | on Brad's work EC2 account | +| plan9-386-cnielsen | Intel Core 2 Quad Q8200 2.33 GHz, 6GB | David du Colombier | Plan 9 from Bell Labs, updated nightly | +| plan9-amd64-aram | VM | Nick Owens | runs 9front | +| solaris-amd64-smartos | E5-1650 Xeon, 6C/12T | Daniel Malon | runs illumos (smartos zone); dfc, aram have full access | +| solaris-amd64-solaris11 | VM | Dave Cheney | runs Solaris 11 | +| windows-386 | on GCE 16 core instance, same machine as windows-amd64 | bradfitz | | +| windows-amd64 | on GCE 16 core instance, same machine as windows-386 | bradfitz | | +| windows-amd64-race | Windows 8.1, 2 x Intel Xeon E5620 @ 2.4GHz, 8 HT cores, 12GB RAM | Dmitry Vyukov | Only runs -race tests (./race.bash) | + +# Builder Requirements + * internet connection (at least be able to access Google and http://build.golang.org) + * preferably with two or more (V)CPUs, as at least one test (` sync/atomic ` requires ` runtime.NumCPU() > 1 ` to test more completely) + * at least 512MiB of memory + +# Restrictions + * The combination of Ubuntu 11.10 or 12.04 OMAP4 kernel and pandaboard (ES) have proven unstable as builders. See [issue 4305](https://code.google.com/p/go/issues/detail?id=4305). Make sure you have updated to the latest available 12.04.2 release. + +# How to set up a builder + 1. obtain a hash from Go team members, and put that in ` ~/.gobuildkey ` + 1. go get code.google.com/p/go.tools/dashboard/builder + 1. builder YOUR\_BUILDER\_NAME + +# Special notes + * Please make sure you've installed root certificates and it's accessible to Go programs. For example, on NetBSD, you will need to install ` security/mozilla-rootcerts `. + * If your builder runs Unix, please install ` perl `, as tests for ` go.tools/cmd/vet ` need it. + * Use ` screen(1) ` instead of ` tmux(1) ` to host the ` builder ` process, as the later interference with some of the ` os/signal ` tests. + * Raise ` ulimit `s on Unix: thread count (` -r `), nofiles (` -n `, 1024 should be fine) \ No newline at end of file diff --git a/DesignDocuments.md b/DesignDocuments.md new file mode 100644 index 00000000..a591e23b --- /dev/null +++ b/DesignDocuments.md @@ -0,0 +1,52 @@ +# Go 1.1 + * [net/http/cookiejar](https://groups.google.com/d/msg/golang-dev/ygDB3nbir00/rouknDcuyakJ) + * [Function Calls](https://docs.google.com/document/d/1bMwCey-gmqZVTpRax-ESeVuZGmjwbocYs1iHplK-cjo/pub) + +# Go 1.2 + + * [xml.Marshaler and Umarshaler](http://golang.org/s/go12xml) + * [encoding.TextMarshaler and Unmarshaler](http://golang.org/s/go12encoding) + * [Runtime Symbol Table Format](http://golang.org/s/go12symtab) + * [Field Selectors and Nil Checks](http://golang.org/s/go12nil) + * x[i:j:k] [Slice Syntax](http://golang.org/s/go12slice) + * [Preemptive Scheduler](https://docs.google.com/document/d/1ETuA2IOmnaQ4j81AtTGT40Y4_Jr6_IDASEKg0t0dBR8/edit?usp=sharing) + +# Go 1.3 + + * [Contiguous Stacks](https://docs.google.com/document/d/1wAaf1rYoM4S4gtnPh0zOlGzWtrZFQ5suE8qr2sD8uWQ/pub) + * [Go 1.3 Linker Overhaul](https://golang.org/s/go13linker) + * [Go 1.3 Native Client Support](https://docs.google.com/document/d/1oA4rs0pfk5NzUyA0YX6QsUEErNIMXawoscw9t0NHafo/pub) + +# Go 1.4 + + * [Go channels on steroids](http://golang.org/s/go13chan) + * [Go 1.4 “Internal” Packages](http://golang.org/s/go14internal) + * [Go 1.4 src/pkg → src](http://golang.org/s/go14nopkg) + * [Go 1.4 Custom Import Path Checking](http://golang.org/s/go14customimport) + * [Go generate: A Proposal](http://golang.org/s/go1.4-generate) + * [The syscall package](https://docs.google.com/a/golang.org/document/d/1QXzI9I1pOfZPujQzxhyRy6EeHYTQitKKjHfpq0zpxZs) + * [Go 1.4: unsafe.Pointer arithmetic](https://docs.google.com/a/dempsky.org/document/d/1yyCMzE4YPfsXvnZNjhszaYNqavxHhvbY-OWPqdzZK30/pub) + * [Go 1.4 Subrepo Renaming](http://golang.org/s/go14subrepo) + * [Go Compiler Overhaul](https://docs.google.com/document/d/1P3BLR31VA8cvLJLfMibSuTdwTuF7WWLux71CYD0eeD8/edit) + +# Future Proposals + + * [dev.cc branch plan](http://golang.org/s/dev.cc) + * [Go 1.4+ Garbage Collection (GC) Plan and Roadmap](http://golang.org/s/go14gc) + * [Better GC and Memory Allocator for Go](https://docs.google.com/document/d/1HCPu3WKyCX3ZRYxmIMKTk0Ik1dePxKW1p02k3uhcft4/view)
- Groups Discussion + + +

Other Tools

+ + +

Rejected Proposals

+