blob: 57c81f46782929247a779fc16b75b9d5df8c4857 [file] [log] [blame] [view]
Alberto Donizettid7b1f582018-12-27 17:24:18 +01001Welcome to the Go wiki, a collection of information about the [Go Programming Language](https://golang.org/). [Awesome Go](http://awesome-go.com/) is another great resource for Go programmers, curated by the Go community.
adg87f483a2014-12-09 16:42:53 -08002
Alberto Donizettid7b1f582018-12-27 17:24:18 +01003## Contributing ##
Jason Buberel3bf56bc2015-11-14 14:11:48 -08004
Alberto Donizettid7b1f582018-12-27 17:24:18 +01005* This wiki is open to editing by any member of the Go community with a GitHub account.
6* If you would like to add a new page, please first open an issue in the [Go issue tracker](https://github.com/golang/go/issues) with the prefix 'wiki' to propose the addition. Clearly state why the content does not fit into any of the existing pages.
7* Because renaming of pages in the wiki can break external links, please open an issue before renaming or removing any wiki page.
Jason Buberel3bf56bc2015-11-14 14:11:48 -08008
9
Alberto Donizettid7b1f582018-12-27 17:24:18 +010010Table of Contents
11=================
adg87f483a2014-12-09 16:42:53 -080012
Alberto Donizettid7b1f582018-12-27 17:24:18 +010013+ [Getting started with Go](#getting-started-with-go)
14+ [Working with Go](#working-with-go)
15+ [Learning more about Go](#learning-more-about-go)
16+ [The Go Community](#the-go-community)
17+ [Using the go toolchain](#using-the-go-toolchain)
18+ [Additional Go Programming Wikis](#additional-go-programming-wikis)
19+ [Online Services that work with Go](#online-services-that-work-with-go)
20+ [Troubleshooting Go Programs in Production](#troubleshooting-go-programs-in-production)
21+ [Contributing to the Go Project](#contributing-to-the-go-project)
22+ [Platform Specific Information](#platform-specific-information)
23+ [Release Specific Information](#release-specific-information)
24+ [Questions](Questions)
adg87f483a2014-12-09 16:42:53 -080025
Su Shi88a60462019-01-24 14:23:22 -080026## Getting started with Go
Jason Buberel46369702015-08-21 13:21:29 -070027
Alberto Donizettid7b1f582018-12-27 17:24:18 +010028 - [The Go Tour](http://tour.golang.org) is the best place to start.
29 - [Effective Go](https://golang.org/doc/effective_go.html) will help you learn how to write idiomatic Go code.
30 - [Go standard library documentation](https://golang.org/pkg/) to familiarize yourself with the standard library.
31 - [Use the Go Playground](http://play.golang.org) to test out Go programs in your browser.
32 - Still not convinced? Check out this list of [Go Users](GoUsers) and a few of their [Success stories](SuccessStories). We've also assembled a long list of reasons [why you should give Go a try](whygo).
33 - Read about the companies which have [switched from other languages to Go](https://github.com/golang/go/wiki/FromXToGo).
Jason Buberel46369702015-08-21 13:21:29 -070034
Alberto Donizettid7b1f582018-12-27 17:24:18 +010035## Working with Go
Jason Buberel46369702015-08-21 13:21:29 -070036
Alberto Donizettid7b1f582018-12-27 17:24:18 +010037Ready to write some Go code of your own? Here are a few links to help you get started.
Jason Buberel46369702015-08-21 13:21:29 -070038
Alberto Donizettid7b1f582018-12-27 17:24:18 +010039 - Install and Setup your Environment
40 - Start here: [Official Installation Documentation](https://golang.org/doc/install)
41 - If you prefer to install from source, [read this first](https://golang.org/doc/install/source).
42 - [InstallFromSource](InstallFromSource) - Additional tips on source installs.
43 - Windows user? [Install and configure Go, Git and Atom for Windows](https://github.com/abourget/getting-started-with-golang)
44 - Mac user? [How I start - Go](https://howistart.org/posts/go/1) - A step-by-step guide to installing Go and building your first web service.
45 - Having installation problems? [InstallTroubleShooting](InstallTroubleShooting)
46 - Make sure you have your [$GOPATH environment variable set correctly](https://golang.org/doc/install/source#gopath)
47 - If you need additional tips on using [$GOPATH, go here](GOPATH).
48 - [MultipleGoRoots](MultipleGoRoots) - More advanced information on working with multiple go installations and the `$GOROOT` variable.
49 - [Go IDEs and Editors](IDEsAndTextEditorPlugins) - Information on how to use your favorite editor with Go.
50 - [Tools for working with Go code](CodeTools) - Formatting, linting, vetting, refactoring, navigation and visualization.
51 - Finding Go Libraries and Packages
52 - Start here: [Go open source projects](Projects).
53 - Search for Go packages: [godoc.org](http://godoc.org)
54 - Visualization of the [Go open source package graph](https://anvaka.github.io/pm/#/galaxy/gosearch?l=1)
55 - [Managing your dependencies](PackageManagementTools) - An overview of the tools you can use to manage third-party packages (vendoring).
56 - Publishing Go Packages as Open Source
57 - Getting ready to publish your package? [Start here.](PackagePublishing)
58 - [The Go Checklist](https://github.com/matttproud/gochecklist) - A comprehensive guide for publishing a project.
59 - [How to layout your GitHub repo](GitHubCodeLayout) to make it easy to for other Go programmers to use with the `go get` command.
60 - [Go Package, Go](https://johnsto.co.uk/blog/go-package-go) - A few recommendations for making Go packages easy to use.
Jason Buberel46369702015-08-21 13:21:29 -070061
Alberto Donizettid7b1f582018-12-27 17:24:18 +010062## Learning more about Go
Jason Buberel46369702015-08-21 13:21:29 -070063
Alberto Donizettid7b1f582018-12-27 17:24:18 +010064Once you have an overview of the language, here are resources you can use to learn more.
Jason Buberel46369702015-08-21 13:21:29 -070065
Alberto Donizettid7b1f582018-12-27 17:24:18 +010066 - [Learning Go](Learn) - A collection of resources for learning Go - beginner to advanced.
67 - [Best Practices for a New Go Developer](https://medium.com/@IndianGuru/best-practices-for-a-new-go-developer-8660384302fc) - Insights from Go community members.
68 - [Server programming](LearnServerProgramming) - Building web, mobile, and API servers.
69 - [More on concurrency](LearnConcurrency)
70 - [More on error handling](LearnErrorHandling)
71 - [More on testing](LearnTesting)
72 - [More on mobile - Android and iOS](Mobile)
73 - [Books](Books) - A list of Go books that have been published (ebook, paper)
74 - [Blogs](Blogs) - Blogs about Go
75 - [Podcasts](Podcasts) - Podcasts and episodes featuring Go
76 - Videos, Talks and Presentations
77 - [GopherVids](http://gophervids.appspot.com/) is a searchable index of videos about Go.
78 - [GoTalks](GoTalks) - A collection of talks from Go conferences and meetups.
79 - [Screencasts](Screencasts)
80 - [Articles](Articles) - A collection of articles to help you learn more about Go.
81 - [Training](Training) - Free and commercial, online and classroom training for Go.
82 - [University Courses](Courses) - A list of CS programs and classes using Go.
83 - [Resources for non-English speakers](NonEnglish)
Jason Buberel46369702015-08-21 13:21:29 -070084
Alberto Donizettid7b1f582018-12-27 17:24:18 +010085## The Go Community
Jason Buberel46369702015-08-21 13:21:29 -070086
Alberto Donizettid7b1f582018-12-27 17:24:18 +010087Here are some of the places where you can find Gophers online. To get a sense of what it means to be a member of the Go community, read [Damian Gryski's keynote from the GolankUK 2015 conference](https://medium.com/@dgryski/the-go-community-f0d00e3a19e) or watch [Andrew Gerrand's closing keynote from GopherCon 2015](https://www.youtube.com/watch?v=0ht89TxZZnk).
Jason Buberel46369702015-08-21 13:21:29 -070088
Jason Buberelb67fb582015-09-28 09:02:38 -070089
Alberto Donizettid7b1f582018-12-27 17:24:18 +010090- Where Gophers hangout online:
91 - [The Go Forum](https://forum.golangbridge.org/) - An all-purpose discussion forum for the Go community.
92 - [Gophers Slack Channel](http://gophers.slack.com/) - For real-time chat ([request membership](http://blog.gopheracademy.com/gophers-slack-community/)).
93 - [Golang News](http://golangnews.com) - For curated links about Go Programming.
94 - There is also a [/r/golang](http://reddit.com/r/golang) sub-reddit.
95 - On Twitter, follow the [@golang](https://twitter.com/golang) account and keep tabs on the [#golang](https://twitter.com/search?q=%23golang&src=typd) hashtag.
96 - We've also got a landing page on [Stack Overflow](http://stackoverflow.com/tags/go) for Go Q&A.
97 - Matrix enthusiasts are invited to join [#Go:matrix.org](https://riot.im/app/#/room/#Go:matrix.org).
98 - Discord users are welcome at the [Discord Gophers](https://discord.gg/VF92f7M) server.
99 - Hashnode users talk and write about Go in [Hashnode Go community](https://hashnode.com/n/go).
100- Mailing Lists
101 - The mailing list for Go users is [golang-nuts](https://groups.google.com/forum/#!forum/golang-nuts) - very high traffic.
102 - Before you post, [check to see if it's already been answered](http://stackoverflow.com/tags/go), then read [these tips on how to ask a good question](HowToAsk)
103 - For discussions about the core Go open source project, join [golang-dev](https://groups.google.com/forum/#!forum/golang-dev).
104 - To get just our release announcements, join [golang-announce](https://groups.google.com/forum/#!forum/golang-announce)
105- User Groups & Meetups - There are [Go Meetups in many cities](http://www.meetup.com/find/?allMeetups=false&keywords=golang&radius=Infinity&userFreeform=Sunnyvale%2C+CA&mcId=z94086&mcName=Sunnyvale%2C+CA&sort=recommended&eventFilter=mysugg)
106 - [GoBridge](http://golangbridge.org) - Volunteers helping underrepresented communities to teach technical skills and to foster diversity in Go.
107 - [Women Who Go](http://www.womenwhogo.org/)
108 - See here for [additional information GoUserGroups](GoUserGroups)
HunterQa2e70f22019-04-12 00:09:23 +0800109 - [GoDiscourse](https://github.com/godiscourse/godiscourse) - Go Discourse is an open source Go based forum from `hello world`.
Alberto Donizettid7b1f582018-12-27 17:24:18 +0100110- [Conferences](Conferences) - A list of upcoming and past Go conferences and major events.
111- [Companies using Go](GoUsers) - A comprehensive list of companies using Go throughout the world.
112- Learn more about the [Go Gopher images](Gopher) by Renee French.
Jason Buberel46369702015-08-21 13:21:29 -0700113
Alberto Donizettid7b1f582018-12-27 17:24:18 +0100114## Using the go toolchain
Jason Buberel46369702015-08-21 13:21:29 -0700115
Alberto Donizettid7b1f582018-12-27 17:24:18 +0100116 - Start with the standard documentation for the `go` command [available here](https://golang.org/cmd/go/)
117 - Start here for to learn about [vendoring](https://golang.org/cmd/go/#hdr-Vendor_Directories).
118 - See also [PackageManagementTools](PackageManagementTools) for package management tools.
119 - [Cross Compilation](https://rakyll.org/cross-compilation/)
120 - Shared libraries and Go (buildmode)
121 - [Go Shared Libraries](https://github.com/jbuberel/buildmodeshared) - Examples for creating and using shared libraries from Go and Python.
122 - [Sharing Go Packages with C](http://blog.ralch.com/tutorial/golang-sharing-libraries/) - by [@ralch](https://twitter.com/ralch).
123 - [Calling Go libraries from Python](https://blog.filippo.io/building-python-modules-with-go-1-5/) - by Filippo Valsorda
124 - [Calling Go libraries from Ruby](http://c7.se/go-and-ruby-ffi/) - by Peter Hellberg
125 - [Calling Go libraries from Swift](https://rakyll.org/swift/) - by Jaana Burcu Dogan
126 - [Build a Ruby Gem with a Go native extension](http://blog.paracode.com/2015/08/28/ruby-and-go-sitting-in-a-tree) - by @jondot
127 - [gohttplib](https://github.com/shazow/gohttplib) - An experiment in using Go 1.5 buildmode=c-shared.
128 - See the wikis below for additional details:
129 - [GoGetTools](GoGetTools)
130 - [GoGetProxyConfig](GoGetProxyConfig)
131 - [cgo](cgo)
132 - [CompilerOptimizations](CompilerOptimizations)
133 - [GccgoCrossCompilation](GccgoCrossCompilation)
134 - [GcToolchainTricks](GcToolchainTricks)
135 - [GoGenerateTools](GoGenerateTools)
136 - [Go Tooling Essentials](https://rakyll.org/go-tool-flags/) - by Jaana Burcu Dogan
137
138## Additional Go Programming Wikis
Jason Buberelda855892015-08-22 15:15:20 -0700139
Alberto Donizettid7b1f582018-12-27 17:24:18 +0100140 - [Why Go doesn't Support Generics: A Summary of Go Generics Discussions](https://docs.google.com/document/d/1vrAy9gMpMoS3uaVphB32uVXX4pi-HnNjkMEgyAHX4N4/preview) - Start here before you join the debate.
141 - Concurrency
142 - [Timeouts](Timeouts) - Abandon async calls that take too long
143 - [LockOSThread](LockOSThread)
144 - [MutexOrChannel](MutexOrChannel) - When to use one vs the other
145 - [RaceDetector](RaceDetector) - How to detect and fix race conditions
146 - Working with Databases
147 - [database/sql](http://go-database-sql.org/) - Online tutorial for working with the database/sql package.
148 - [TUGTBDDAwG](https://vividcortex.com/resources/building-database-driven-apps-with-go/) - Guide to building data driven apps.
149 - [SQLDrivers](SQLDrivers)
150 - [SQLInterface](SQLInterface)
151 - From other languages
152 - [Go for Java Programmers](http://yourbasic.org/golang/go-java-tutorial/)
153 - [Go for C++ Programmers](GoForCPPProgrammers)
154 - Strings
155 - [GoStrings](GoStrings)
156 - [String Matching](http://blog.gopheracademy.com/advent-2014/string-matching/)
157 - [Comments](Comments)
158 - [CommonMistakes](CommonMistakes)
159 - [Errors](Errors)
160 - [GcToolchainTricks](GcToolchainTricks)
161 - [Hashing](Hashing)
162 - [HttpFetch](HttpFetch)
163 - [HttpStaticFiles](HttpStaticFiles)
164 - [InterfaceSlice](InterfaceSlice)
165 - [Iota](Iota)
166 - [MethodSets](MethodSets)
167 - [PanicAndRecover](PanicAndRecover)
168 - [Range](Range)
169 - [RateLimiting](RateLimiting)
170 - [Rationales](Rationales)
171 - [SendingMail](SendingMail)
172 - [SignalHandling](SignalHandling)
173 - [SimultaneousAssignment](SimultaneousAssignment)
174 - [SliceTricks](SliceTricks)
175 - [Switch](Switch)
176 - [TableDrivenTests](TableDrivenTests)
Jason Buberel0e6e3cd2015-09-11 17:35:30 -0700177
Jason Buberel46369702015-08-21 13:21:29 -0700178
Alberto Donizettid7b1f582018-12-27 17:24:18 +0100179## Online Services that work with Go
Mike Schinkel4227ff02018-12-25 06:38:09 -0500180
Alberto Donizettid7b1f582018-12-27 17:24:18 +0100181If you're looking for services that support Go, here's a list to get you started.
Mike Schinkel4227ff02018-12-25 06:38:09 -0500182
Alberto Donizettid7b1f582018-12-27 17:24:18 +0100183 - Cloud Computing - Go is well supported on most cloud service providers.
184 - [Amazon Web Services](https://github.com/aws/aws-sdk-go)
185 - [Azure](https://github.com/Azure/azure-sdk-for-go)
186 - [Digital Ocean](https://github.com/digitalocean/godo)
187 - [GE Predix](https://github.com/geaviation/goboot-starter)
188 - [Google Cloud Platform for Go](https://cloud.google.com/go)
189 - [Heroku](https://github.com/heroku/heroku-buildpack-go)
190 - [IBM Bluemix](https://developer.ibm.com/bluemix/2015/10/28/getting-started-with-golang-on-bluemix/)
191 - [OpenStack](https://github.com/openstack/golang-client)
192 - [Vscale](https://github.com/vscale/go-vscale)
193 - [Aliyun](https://github.com/aliyun/alibaba-cloud-sdk-go)
194 - See here for [information on additional providers](ProviderIntegration)
195 - [Continuous Integration and Continuous Deployment](HostedContinuousIntegration) - Go is well supported by most CI/CD frameworks
196 - Monitoring/Logging
197 - [DeferPanic](http://deferpanic.com) - Dedicated Go application performance monitoring.
198 - [OpsDash](https://www.opsdash.com/) - Go-based cluster monitoring platform.
199 - Package and Dependency Management
200 - [Gopkg.in](http://labix.org/gopkg.in) is a source for stable Go libraries, provided by Gustavo Niemeyer.
Mike Schinkel4227ff02018-12-25 06:38:09 -0500201
Alberto Donizettid7b1f582018-12-27 17:24:18 +0100202## Troubleshooting Go Programs in Production
Mike Schinkel4227ff02018-12-25 06:38:09 -0500203
Alberto Donizettid7b1f582018-12-27 17:24:18 +0100204 - Understand the performance of your Go apps using the [pprof package](http://blog.golang.org/profiling-go-programs)
205 - Heap Dumps
206 - [heapdump13](heapdump13)
207 - [heapdump14](heapdump14)
208 - [heapdump15](https://github.com/golang/go/wiki/heapdump15)
Mike Schinkel4227ff02018-12-25 06:38:09 -0500209
Alberto Donizettid7b1f582018-12-27 17:24:18 +0100210## Contributing to the Go Project
Mike Schinkel4227ff02018-12-25 06:38:09 -0500211
Alberto Donizettid7b1f582018-12-27 17:24:18 +0100212 - Start by reading the [Go Contribution Guidelines](https://golang.org/doc/contribute.html)
213 - If you'd like to propose a change to the Go project, start by reading the [Go Change Proposal Process](https://github.com/golang/proposal)
214 - An archive of [design documents is also available](DesignDocuments)
215 - Go releases happen on ~6 month intervals. [See here for more information](Go-Release-Cycle)
216 - Want to know more about how the [Go source sub-repositories are structured?](SubRepositories)
217 - The Go project requires that all code be reviewed before it is submitted.
218 - Read more about our [code review practices](CodeReview)
219 - If you're commenting on code under review, please read [these guidelines](CodeReviewComments)
220 - Issues
221 - Bug reports and feature requests should be filed using the [GitHub issue tracker](https://github.com/golang/go/issues)
222 - Want to understand how we [handle issues that are reported?](HandlingIssues)
223 - Project Dashboards
224 - [Go Builds Dashboard info](DashboardBuilders)
225 - [Performance Dashboard info](PerfDashboard)
Mike Schinkel4227ff02018-12-25 06:38:09 -0500226
Alberto Donizettid7b1f582018-12-27 17:24:18 +0100227## Platform Specific Information
Mike Schinkel4227ff02018-12-25 06:38:09 -0500228
Alberto Donizettid7b1f582018-12-27 17:24:18 +0100229 - See [MinimumRequirements](MinimumRequirements) for minimum platform requirements of current Go ports.
230 - Considering porting Go to a new platform? [Read our porting policy first](PortingPolicy)
231 - [Mobile](Mobile)
232 - [Ubuntu](Ubuntu)
233 - [Windows](Windows)
234 - [WindowsBuild](WindowsBuild)
235 - [WindowsCrossCompiling](WindowsCrossCompiling)
236 - [WindowsDLLs](WindowsDLLs)
237 - [GoArm](GoArm)
238 - [ChromeOS](ChromeOS)
239 - [Darwin](Darwin)
240 - [DragonFly BSD](DragonFly-BSD)
241 - [FreeBSD](FreeBSD)
242 - [Linux](Linux)
243 - [NativeClient](NativeClient)
244 - [NetBSD](NetBSD)
245 - [OpenBSD](OpenBSD)
246 - [Plan 9](Plan9)
247 - [Solaris](Solaris)
Mike Schinkel4227ff02018-12-25 06:38:09 -0500248
Alberto Donizettid7b1f582018-12-27 17:24:18 +0100249## Release Specific Information
Mike Schinkel4227ff02018-12-25 06:38:09 -0500250
Alberto Donizettid7b1f582018-12-27 17:24:18 +0100251 - [Go1point1Gotchas](Go1point1Gotchas)
252 - [OlderVersions](OlderVersions)
Mike Schinkel4227ff02018-12-25 06:38:09 -0500253
Alberto Donizettid7b1f582018-12-27 17:24:18 +0100254Notes:
Mike Schinkel4227ff02018-12-25 06:38:09 -0500255
Shulhan8649f9f2019-03-06 20:04:27 +0700256- Please refrain from changing the title of the wiki pages, as some of them might be linked to from [golang.org](https://golang.org) or other websites.