Revert 46f1dbefd64df19e313a966e76c1ec3a36d8788e...4227ff00319069d3d6dd2dde09c41f410a38d982 on Home

Alberto Donizetti 2018-12-27 17:24:18 +01:00
parent f8caa2dd1d
commit d7b1f5842d

509
Home.md

@ -1,254 +1,255 @@
This page collects experience reports about problems with Go that might inform our design of solutions to those problems. These reports should focus on the _problems_: they should not focus on and need not propose solutions. To propose solutions, see the [proposal process](https://golang.org/s/proposal). Welcome 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.
We hope to use these experience reports to understand where people are having trouble writing Go, to help us prioritize future changes to the Go ecosystem. (We do not promise to reply to these. If you need immediate help answering questions about Go, see [https://golang.org/help/](https://golang.org/help/) for resources.) ## Contributing ##
__The best experience reports tell: (1) what you wanted to do, (2) what you actually did, and (3) why that wasnt great, illustrating those by real concrete examples, ideally from production use.__ Please write these reports about the problems most significant to you, post them on your own blog, or on Medium, or as a [Github Gist](https://gist.github.com/) (use a `.md` extension for Markdown), or as a publicly-readable Google doc, and then link them here. (Talk videos or slides are also welcome, although they are not as convenient for us to digest.) * This wiki is open to editing by any member of the Go community with a GitHub account.
* 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.
If you do not have permission to edit the wiki to add an article to this list, [please file an issue](https://golang.org/issue/new). * Because renaming of pages in the wiki can break external links, please open an issue before renaming or removing any wiki page.
Please keep the overall page sorted alphabetically by section (Error Handling before Logging, and so on).
Within a section, please keep articles sorted chronologically. Table of Contents
It's helpful to include a one-phrase summary of the point of each article. =================
Add new sections as appropriate. + [Getting started with Go](#getting-started-with-go)
+ [Working with Go](#working-with-go)
**Table of Contents** + [Learning more about Go](#learning-more-about-go)
+ [The Go Community](#the-go-community)
- [App and Game Development](#app-and-game-development) + [Using the go toolchain](#using-the-go-toolchain)
- [Concurrency](#concurrency) + [Additional Go Programming Wikis](#additional-go-programming-wikis)
- [Casting](#casting) + [Online Services that work with Go](#online-services-that-work-with-go)
- [Context](#context) + [Troubleshooting Go Programs in Production](#troubleshooting-go-programs-in-production)
- [Declarations](#declarations) + [Contributing to the Go Project](#contributing-to-the-go-project)
- [Dependencies](#dependencies) + [Platform Specific Information](#platform-specific-information)
- [Documentation](#documentation) + [Release Specific Information](#release-specific-information)
- [Diagnostics and Debugging](#diagnostics-and-debugging) + [Questions](Questions)
- [Education and Teaching](#education-and-teaching)
- [Error Handling](#error-handling) ## Getting started with Go
- [File System](#file-system)
- [Generics](#generics) - [The Go Tour](http://tour.golang.org) is the best place to start.
- [GoMobile](#gomobile) - [Effective Go](https://golang.org/doc/effective_go.html) will help you learn how to write idiomatic Go code.
- [Immutability](#immutability) - [Go standard library documentation](https://golang.org/pkg/) to familiarize yourself with the standard library.
- [Inter Process Communication](#inter-process-communication) - [Use the Go Playground](http://play.golang.org) to test out Go programs in your browser.
- [Large-Scale Software Development](#large-scale-software-development) - 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).
- [Logging](#logging) - Read about the companies which have [switched from other languages to Go](https://github.com/golang/go/wiki/FromXToGo).
- [Misc/Multiple](#misc--multiple)
- [Modules](#modules) ## Working with Go
- [Performance](#performance)
- [Porting](#porting) Ready to write some Go code of your own? Here are a few links to help you get started.
- [Slices](#slices)
- [Syntax](#syntax) - Install and Setup your Environment
- [Time](#time) - Start here: [Official Installation Documentation](https://golang.org/doc/install)
- [Tooling](#tooling) - If you prefer to install from source, [read this first](https://golang.org/doc/install/source).
- [Type System](#type-system) - [InstallFromSource](InstallFromSource) - Additional tips on source installs.
- [Typed nils](#typed-nils) - Windows user? [Install and configure Go, Git and Atom for Windows](https://github.com/abourget/getting-started-with-golang)
- [Vendoring](#vendoring) - 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.
- Having installation problems? [InstallTroubleShooting](InstallTroubleShooting)
## App and Game Development - Make sure you have your [$GOPATH environment variable set correctly](https://golang.org/doc/install/source#gopath)
- If you need additional tips on using [$GOPATH, go here](GOPATH).
- Paul Ruest, "[Go Library Support for Apps and Games](https://gazed.github.io/goApps.html)", November 2017 - [MultipleGoRoots](MultipleGoRoots) - More advanced information on working with multiple go installations and the `$GOROOT` variable.
- Tad Vizbaras, "[Building Optical Character Recognition (OCR) in Go](http://recoink.com/goreport)", December 2017 - [Go IDEs and Editors](IDEsAndTextEditorPlugins) - Information on how to use your favorite editor with Go.
- [Tools for working with Go code](CodeTools) - Formatting, linting, vetting, refactoring, navigation and visualization.
## Casting - Finding Go Libraries and Packages
- Start here: [Go open source projects](Projects).
- Richard Warburton, "[Should Go Casting be permitted when underlying data structures are the same?](https://gist.github.com/krolaw/f010ab0966fd379725ecc48e8bbcac1c)", December 2017 - Search for Go packages: [godoc.org](http://godoc.org)
- Visualization of the [Go open source package graph](https://anvaka.github.io/pm/#/galaxy/gosearch?l=1)
## Concurrency - [Managing your dependencies](PackageManagementTools) - An overview of the tools you can use to manage third-party packages (vendoring).
- Publishing Go Packages as Open Source
- Sergey Kamardin, “[A Million WebSockets and Go](https://medium.freecodecamp.org/million-websockets-and-go-cc58418460bb),” August 2017, about the memory overhead of blocked read/write goroutines. - Getting ready to publish your package? [Start here.](PackagePublishing)
- Nathaniel J. Smith, “[Notes on structured concurrency, or: Go statement considered harmful](https://vorpus.org/blog/notes-on-structured-concurrency-or-go-statement-considered-harmful/)”, April 2018. - [The Go Checklist](https://github.com/matttproud/gochecklist) - A comprehensive guide for publishing a project.
- [How to layout your GitHub repo](GitHubCodeLayout) to make it easy to for other Go programmers to use with the `go get` command.
## Context - [Go Package, Go](https://johnsto.co.uk/blog/go-package-go) - A few recommendations for making Go packages easy to use.
- Sam Vilain, “[Using Go's context library for making your logs make sense](https://blog.gopheracademy.com/advent-2016/context-logging/),” December 2016, about extracting structured log values from context. ## Learning more about Go
- Jon Calhoun, “[Pitfalls of context values and how to avoid or mitigate them in Go](https://www.calhoun.io/pitfalls-of-context-values-and-how-to-avoid-or-mitigate-them/),” February 2017.
- Michal Štrba, "[Context should go away for Go 2](https://faiface.github.io/post/context-should-go-away-go2/)," August 2017 Once you have an overview of the language, here are resources you can use to learn more.
- Axel Wagner, "[Why context.Value matters and how to improve it](https://blog.merovius.de/2017/08/14/why-context-value-matters-and-how-to-improve-it.html)," August 2017.
- Dave Cheney, "[Context isn't for cancellation](https://dave.cheney.net/2017/08/20/context-isnt-for-cancellation)," August 2017. - [Learning Go](Learn) - A collection of resources for learning Go - beginner to advanced.
- Ross Light, "[Canceling I/O in Go Cap'n Proto](https://medium.com/@zombiezen/canceling-i-o-in-go-capn-proto-5ae8c09c5b29)," January 2018. - [Best Practices for a New Go Developer](https://medium.com/@IndianGuru/best-practices-for-a-new-go-developer-8660384302fc) - Insights from Go community members.
- Iman Tumorang, "[Avoiding Memory Leak in Golang API](https://hackernoon.com/avoiding-memory-leak-in-golang-api-1843ef45fca8)," January 2018. - [Server programming](LearnServerProgramming) - Building web, mobile, and API servers.
- [More on concurrency](LearnConcurrency)
## Declarations - [More on error handling](LearnErrorHandling)
- [More on testing](LearnTesting)
- Christophe Meessen, "[Problems with Go's shorthand declaration :=](https://gist.github.com/chmike/ac0113afefbc04e67323b4a3688d6b54#file-godeclareproblem-md)", July 2017, about the shadowing var trap and apparent inconsistency of `:=`. - [More on mobile - Android and iOS](Mobile)
- Brian Will, "[Go's := syntax is error-prone with multiple target variables](https://gist.github.com/BrianWill/671ce51e6ef6a9f0caa27272a9a0637f)", August 2017. - [Books](Books) - A list of Go books that have been published (ebook, paper)
- [Blogs](Blogs) - Blogs about Go
## Dependencies - [Podcasts](Podcasts) - Podcasts and episodes featuring Go
- Videos, Talks and Presentations
- John Doe, "[Forks, import paths, and `go get`](https://gist.github.com/johnAnonDoe/2071b8811300c6c08ac21cc8da9fa4d3)", July 2017. - [GopherVids](http://gophervids.appspot.com/) is a searchable index of videos about Go.
- Patrick Bohan, "[Docker => Moby: Go Dependencies](http://engineering.rallyhealth.com/go/golang/dependencies/package-managers/2017/06/28/go-and-dependencies.html)," Jun 28, 2017. A new Go team's struggles with dependency management and an approach to deal with them. - [GoTalks](GoTalks) - A collection of talks from Go conferences and meetups.
- Judson Lester, "[untitled gist] (https://gist.github.com/nyarly/edb6b7a5e3a762da6a5e2da8f59acf07)", August 2017. - [Screencasts](Screencasts)
- David Collier-Brown, "[Avoiding an NP-Complete Problem by Recycling Multics Answer](https://leaflessca.wordpress.com/2018/09/03/avoiding-an-np-complete-problem-by-recycling-multics-answer/)", September 2018. - [Articles](Articles) - A collection of articles to help you learn more about Go.
- [Training](Training) - Free and commercial, online and classroom training for Go.
## Diagnostics and Debugging - [University Courses](Courses) - A list of CS programs and classes using Go.
- [Resources for non-English speakers](NonEnglish)
- Kevin Burke, "[How I'm running benchmarks and printing their results](https://github.com/kevinburke/go-html-boilerplate/blob/master/Makefile#L38)", it would be nice if I didn't need so much Unix glue to run and print these. July 2017.
- John Clarke, Tracking down an intermittent fault (not a race) by running a very slow {hit test failure, increase logging} cycle by running "do { go test -race } while ( $LASTEXITCODE -eq 0 )" overnight. Over many nights. Execution trace functionality like https://rr-project.org/ would be transformative. November 2018. ## The Go Community
## Education and Teaching Here 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).
- Carl Kingsford and Phillip Compeau, "[Go 2.0 for Teaching](http://www.monogrammedchalk.com/go-2-for-teaching/)". Experience using Go in an introductory programming course.
- Where Gophers hangout online:
## Documentation - [The Go Forum](https://forum.golangbridge.org/) - An all-purpose discussion forum for the Go community.
- [Gophers Slack Channel](http://gophers.slack.com/) - For real-time chat ([request membership](http://blog.gopheracademy.com/gophers-slack-community/)).
- Kevin Burke, "[Need to add documentation for a binary in three different places](https://github.com/golang/go/issues/20212)", May 2017. - [Golang News](http://golangnews.com) - For curated links about Go Programming.
- There is also a [/r/golang](http://reddit.com/r/golang) sub-reddit.
## Error Handling - 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.
- We've also got a landing page on [Stack Overflow](http://stackoverflow.com/tags/go) for Go Q&A.
(This section is about writing `if err != nil`.) - Matrix enthusiasts are invited to join [#Go:matrix.org](https://riot.im/app/#/room/#Go:matrix.org).
- Discord users are welcome at the [Discord Gophers](https://discord.gg/VF92f7M) server.
- Andrew Gerrand, “[Error Handling and Go](https://blog.golang.org/error-handling-and-go),” July 2011, - Hashnode users talk and write about Go in [Hashnode Go community](https://hashnode.com/n/go).
showing Go error handling patterns. - Mailing Lists
- Martin Sústrik, “[Why should I have written ZeroMQ in C, not C++ (part I)](http://www.250bpm.com/blog:4),” May 2012, - The mailing list for Go users is [golang-nuts](https://groups.google.com/forum/#!forum/golang-nuts) - very high traffic.
discussing production problems with C++ exception handling due to error-handling code being far from code that causes the error. - 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)
- Thomi Richards, “[The Problems with Errors](http://www.tech-foo.net/the-problems-with-errors.html),” March 2014, - For discussions about the core Go open source project, join [golang-dev](https://groups.google.com/forum/#!forum/golang-dev).
arguing that it's essential for code to document exactly which errors it returns / exceptions it might throw. - To get just our release announcements, join [golang-announce](https://groups.google.com/forum/#!forum/golang-announce)
- Roger Peppe, “[Lovin' your errors](https://rogpeppe.neocities.org/error-loving-talk/index.html),” March 2015, discussing idioms for error handling. - 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)
- Bleve, “[Deferred Cleanup, Checking Errors, and Potential Problems](http://www.blevesearch.com/news/Deferred-Cleanup,-Checking-Errors,-and-Potential-Problems/),” September 2015, - [GoBridge](http://golangbridge.org) - Volunteers helping underrepresented communities to teach technical skills and to foster diversity in Go.
showing a bug related to error handling and defer in Bleve search. - [Women Who Go](http://www.womenwhogo.org/)
- Andrew Morgan, “[What I Don't Like About Error Handling in Go, and How to Work Around It](https://opencredo.com/why-i-dont-like-error-handling-in-go/),” January 2017, - See here for [additional information GoUserGroups](GoUserGroups)
about it being difficult to force good error handling, errors not having stack traces, and error handling being too verbose. - [Conferences](Conferences) - A list of upcoming and past Go conferences and major events.
- André Hänsel, "[If were to make my own Go…](https://blog.creations.de/?p=223)", August 2017 - [Companies using Go](GoUsers) - A comprehensive list of companies using Go throughout the world.
- Peter Goetz, "[Thinking About New Ways of Error Handling in Go 2](https://medium.com/@peter.gtz/thinking-about-new-ways-of-error-handling-in-go-2-e56d116952f1)," September 2017, shows how error-prone error handling in Go is and lays out requirements to improve the experience. - Learn more about the [Go Gopher images](Gopher) by Renee French.
## Error Values ## Using the go toolchain
(This section is about additional error semantics beyond the `Error() string` method.) - Start with the standard documentation for the `go` command [available here](https://golang.org/cmd/go/)
- Start here for to learn about [vendoring](https://golang.org/cmd/go/#hdr-Vendor_Directories).
- Andrew Morgan, “[What I Don't Like About Error Handling in Go, and How to Work Around It](https://opencredo.com/why-i-dont-like-error-handling-in-go/),” January 2017, - See also [PackageManagementTools](PackageManagementTools) for package management tools.
about it being difficult to force good error handling, errors not having stack traces, and error handling being too verbose. - [Cross Compilation](https://rakyll.org/cross-compilation/)
- Chris Siebenmann, “[Go's net package doesn't have opaque errors, just undocumented ones](https://utcc.utoronto.ca/~cks/space/blog/programming/GoNetErrorsUndocumented),” August 2018 - Shared libraries and Go (buildmode)
- [Go Shared Libraries](https://github.com/jbuberel/buildmodeshared) - Examples for creating and using shared libraries from Go and Python.
## File System - [Sharing Go Packages with C](http://blog.ralch.com/tutorial/golang-sharing-libraries/) - by [@ralch](https://twitter.com/ralch).
- [Calling Go libraries from Python](https://blog.filippo.io/building-python-modules-with-go-1-5/) - by Filippo Valsorda
- Chris Lewis, “[Non-Local File Systems Should Be Supported](https://gist.github.com/cflewis/87843028576459b0f6ebf55f1b200891),” July 2017. Proposes replacing file system read calls to something more abstracted like the `sql` package does. - [Calling Go libraries from Ruby](http://c7.se/go-and-ruby-ffi/) - by Peter Hellberg
- [Calling Go libraries from Swift](https://rakyll.org/swift/) - by Jaana Burcu Dogan
## Generics - [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
- [gohttplib](https://github.com/shazow/gohttplib) - An experiment in using Go 1.5 buildmode=c-shared.
- “[Summary of Go Generics Discussions (living document)](https://docs.google.com/document/d/1vrAy9gMpMoS3uaVphB32uVXX4pi-HnNjkMEgyAHX4N4/edit).” - See the wikis below for additional details:
- Mike Schinkel, "[Type Compatibility with Interface Slices](https://mikeschinkel.me/type-compatibility-with-interface-slices/)", December 2018 - [GoGetTools](GoGetTools)
- Bouke van der Bijl, “[Idiomatic Generics in Go](https://web.archive.org/web/20141001043016/http://bouk.co/blog/idiomatic-generics-in-go/),” September 2014. - [GoGetProxyConfig](GoGetProxyConfig)
- Craig Weber, “[Living without generics in Go](https://web.archive.org/web/20141227092139/http://www.weberc2.com/posts/2014/12/12/living-without-generics.txt),” December 2014. - [cgo](cgo)
- Shashank Sharma, “[Poor man's generics in Golang (Go)](https://codeblog.shank.in/poor-mans-generics-in-golang/),” May 2016. - [CompilerOptimizations](CompilerOptimizations)
- Niek Sanders, “[Overhead of Go's generic sort](https://github.com/nieksand/sortgenerics),” September 2016, - [GccgoCrossCompilation](GccgoCrossCompilation)
documenting the overhead of sorting using sort.Interface instead of specialized code. - [GcToolchainTricks](GcToolchainTricks)
- Jon Calhoun, “[Using code generation to survive without generics in Go](https://www.calhoun.io/using-code-generation-to-survive-without-generics-in-go/),” May 2017. - [GoGenerateTools](GoGenerateTools)
- Jon Bodner, “[Closures are the Generics for Go](https://medium.com/capital-one-developers/closures-are-the-generics-for-go-cb32021fb5b5),” June 2017. - [Go Tooling Essentials](https://rakyll.org/go-tool-flags/) - by Jaana Burcu Dogan
- Andrew Stock, "[Why I miss generics in Go](https://medium.com/@watchforstock/why-i-miss-generics-in-go-9aef810a1bef)," June 2017
- Kevin Burke, "[Code example with lots of interface casts](https://gist.github.com/kevinburke/a10aed6d8d07ecd5efe658b21cd168c1)," requires a lot of boilerplate/casts. ## Additional Go Programming Wikis
- Ian Lance Taylor, "[The append function](https://www.airs.com/blog/archives/559)," July 2017.
- DeedleFake, "[The Problem with Interfaces](https://deedlefake.com/2017/07/the-problem-with-interfaces/)", July 2017. - [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.
- Kurtis Nusbaum "[Why I'm So Frustrated With Go](https://hackernoon.com/why-im-so-frustrated-with-go-97c0c4ae214e)," June 2017 - Concurrency
- Juan Álvarez, "[Generics on Go's stdlib](https://medium.com/@shixzie/generics-on-gos-stdlib-10de52fe824d)", July 2017. - [Timeouts](Timeouts) - Abandon async calls that take too long
- David Chase, "[A use case for Go Generics in a Go Compiler](https://dr2chase.wordpress.com/2017/08/09/a-use-case-for-go-generics-in-a-go-compiler/)", August 2017 - [LockOSThread](LockOSThread)
- Varun Kumar, "[Generics - I Wish You Were Here...](https://varunksaini.com/blog/use-case-for-generics/)", August 2017 - [MutexOrChannel](MutexOrChannel) - When to use one vs the other
- Sameer Ajmani, "[Go Experience Report for Generics: Google metrics API](https://medium.com/@sameer_74231/go-experience-report-for-generics-google-metrics-api-b019d597aaa4)", August 2017 - [RaceDetector](RaceDetector) - How to detect and fix race conditions
- Chewxy, "[Tensor Refactor: A Go Experience Report](https://blog.chewxy.com/2017/09/11/tensor-refactor/)", September 2017, discusses the lack of generics and how it affects building high performance multidimensional arrays for different data types (having to resort to a lot of pointer ugliness, and manually keeping track of type and runtime type checking) - Working with Databases
- qwerty2501,"[A problem runtime error due to lack of Generics](https://gist.github.com/qwerty2501/8839af87946571943a6c4f623c6124e2)", October 2017 - [database/sql](http://go-database-sql.org/) - Online tutorial for working with the database/sql package.
- posener, "[Why I recommend to avoid using the go-kit library](https://gist.github.com/posener/330c2b08aaefdea6f900ff0543773b2e)", clear separation of concern need lots of boilerplate code. gokit try - [TUGTBDDAwG](https://vividcortex.com/resources/building-database-driven-apps-with-go/) - Guide to building data driven apps.
code generation to avoid this [#70](https://github.com/go-kit/kit/issues/70) [#308](https://github.com/go-kit/kit/pull/308) [protoc-gen-gokit](https://github.com/AmandaCameron/protoc-gen-gokit) , but it looks like - [SQLDrivers](SQLDrivers)
a complex solution for the problem. - [SQLInterface](SQLInterface)
- Xavier Leroy, "[A modular module system](http://gallium.inria.fr/%7Exleroy/publi/modular-modules-jfp.pdf)", paper about module description for generics. - From other languages
- Tobias Gustafsson, "[Experiences implementing PEDS](https://github.com/tobgu/peds/blob/master/experience_report.md)", PEDS is a set of statically type safe, immutable/persistent, collections. November 2017 - [Go for Java Programmers](http://yourbasic.org/golang/go-java-tutorial/)
- A Googler "[govisor/generics.go](https://github.com/google/gvisor/blob/master/tools/go_generics/generics.go)". April 27, 2018 - [Go for C++ Programmers](GoForCPPProgrammers)
- Strings
## GoMobile - [GoStrings](GoStrings)
- [String Matching](http://blog.gopheracademy.com/advent-2014/string-matching/)
- Vijay, "[Nested structs and slices not supported in gomobile]" - [Comments](Comments)
- [CommonMistakes](CommonMistakes)
## Immutability - [Errors](Errors)
- [GcToolchainTricks](GcToolchainTricks)
- Kurtis Nusbaum "[Why I'm So Frustrated With Go](https://hackernoon.com/why-im-so-frustrated-with-go-97c0c4ae214e)," June 2017 - [Hashing](Hashing)
- Sindre Myren "[Go 2.0: Retain simplicity by trading features](https://medium.com/@smyrman/go-2-0-retain-simplicity-by-trading-features-b310b60862ea)" July 2017 - [HttpFetch](HttpFetch)
- Tobias Gustafsson, "[Experiences implementing PEDS](https://github.com/tobgu/peds/blob/master/experience_report.md)", PEDS is a set of statically type safe, immutable/persistent, collections. November 2017 - [HttpStaticFiles](HttpStaticFiles)
- [InterfaceSlice](InterfaceSlice)
## Inter Process Communication - [Iota](Iota)
- [MethodSets](MethodSets)
- Pablo R. Larraondo "[A Go interprocess communication model](https://gist.github.com/prl900/a7aaa41707e2236592da5e78d8a10dc9)," August 2017 - [PanicAndRecover](PanicAndRecover)
- [Range](Range)
## Large-Scale Software Development - [RateLimiting](RateLimiting)
- [Rationales](Rationales)
- Russ Cox, “[Codebase Refactoring (with help from Go)](https://talks.golang.org/2016/refactor.article),” November 2016, laying out the gradual code repair problem addressed in part by type aliases ([#18130](https://golang.org/issue/18130)). - [SendingMail](SendingMail)
- [SignalHandling](SignalHandling)
## Logging - [SimultaneousAssignment](SimultaneousAssignment)
- [SliceTricks](SliceTricks)
- Evan Miller, “[Logging can be tricky](http://corner.squareup.com/2014/09/logging-can-be-tricky.html),” September 2014, - [Switch](Switch)
showing how logging can add to application tail latency. - [TableDrivenTests](TableDrivenTests)
- Dave Cheney, “[Let's talk about logging](https://dave.cheney.net/2015/11/05/lets-talk-about-logging),” November 2015,
arguing that there are only two log levels.
- TJ Holowaychuk, “[Apex log](https://medium.com/@tjholowaychuk/apex-log-e8d9627f4a9a),” January 2016, describing a structured log package and how it would be used in production. ## Online Services that work with Go
- Paddy Foran, “[Logging in Go](http://tech.dramafever.com/golang/2016/02/08/logging-in-go),” February 2016, showing how DramaFever sends Go program logs to Sentry.
- Martin Angers, “[About Go logging for reusable packages](https://www.0value.com/about-go-logging),” March 2016, making suggestions for how to write code that doesn't assume a particular log package. If you're looking for services that support Go, here's a list to get you started.
- BugReplay.com, “[How to use Google Cloud's Free Structured Logging Service With Golang](http://blog.bugreplay.com/post/150086459149/how-to-use-google-clouds-free-structured-logging),” September 2016.
- Sam Vilain, “[Using Go's context library for making your logs make sense](https://blog.gopheracademy.com/advent-2016/context-logging/),” December 2016, about extracting structured log values from context. - Cloud Computing - Go is well supported on most cloud service providers.
- Logmatic, “[Our Guide to a Golang Logs World](https://logmatic.io/blog/our-guide-to-a-golang-logs-world/),” March 2017. - [Amazon Web Services](https://github.com/aws/aws-sdk-go)
- Chris Hines, Peter Bourgon, “[Proposal: standard Logger interface](https://docs.google.com/document/d/1shW9DZJXOeGbG9Mr9Us9MiaPqmlcVatD_D8lrOXRNMU/edit?usp=drive_web),“ February 2017, problems related to stdlib logger, especially in the context of libraries, and one proposed solution. - [Azure](https://github.com/Azure/azure-sdk-for-go)
- Sindre Myren, "[There is nothing Goish about log.Fatal](https://medium.com/@smyrman/there-is-nothing-goish-about-log-fatal-4ab24ae5ba7)" August 2017, how poorly log.Fatal plays with defer, and a simple pattern for delaing with it in Go 1.x and Go 2.x. - [Digital Ocean](https://github.com/digitalocean/godo)
- [GE Predix](https://github.com/geaviation/goboot-starter)
## Misc / Multiple - [Google Cloud Platform for Go](https://cloud.google.com/go)
- [Heroku](https://github.com/heroku/heroku-buildpack-go)
- Iman Tumorang, "[Trying Clean Architecture on Golang](https://hackernoon.com/golang-clean-archithecture-efd6d7c43047)" July 2017 - [IBM Bluemix](https://developer.ibm.com/bluemix/2015/10/28/getting-started-with-golang-on-bluemix/)
- Laurent Demailly, "[My Go lang experience, part 1](https://laurentsv.com/blog/2017/12/28/about-golang.html)" December 2017, a laundry list of pros and cons with current Go from an experienced C/C++/Java/Scripting languages developer perspective. - [OpenStack](https://github.com/openstack/golang-client)
- Gokcehan Kara, "[Installation with Go Language can be Simpler](https://gokcehan.github.io/posts/installation-with-go-language-can-be-simpler.html)" May 2018, some complications about the installation and distribution of static stripped binaries with version information. - [Vscale](https://github.com/vscale/go-vscale)
- Bob Nystrom, "[The Language I Wish Go Was](https://journal.stuffwithstuff.com/2010/10/21/the-language-i-wish-go-was/)" October 2010, I wish Go had tuples, unions, constructors, no Nil, exceptions, generics, some syntax sugar, and ponies that shoot Cheez Whiz out of their noses. - [Aliyun](https://github.com/aliyun/alibaba-cloud-sdk-go)
- See here for [information on additional providers](ProviderIntegration)
## Modules - [Continuous Integration and Continuous Deployment](HostedContinuousIntegration) - Go is well supported by most CI/CD frameworks
- Monitoring/Logging
- Paul Jolly - "[Creating a submodule within an existing module](https://gist.github.com/myitcv/79c3f12372e13b0cbbdf0411c8c46fd5)" - covers multi-module repos, cyclic module dependencies and the steps required to move between various "states" - [DeferPanic](http://deferpanic.com) - Dedicated Go application performance monitoring.
- Sam Whited -"[Mod file format](https://write.as/7un2fvf4124bm5s0.md)" - complaint about reinventing the serialization format wheel for mod files. - [OpsDash](https://www.opsdash.com/) - Go-based cluster monitoring platform.
- Package and Dependency Management
## Performance - [Gopkg.in](http://labix.org/gopkg.in) is a source for stable Go libraries, provided by Gustavo Niemeyer.
- Kevin Burke, "[Real Life Go Benchmarking](https://kev.inburke.com/kevin/real-life-go-benchmarking/)," trying to explain to the average developer how to use tools like pprof, maybe this could be easier. July 2016. ## Troubleshooting Go Programs in Production
- Nathan Kerr, "[Concurrency Slower?](https://pocketgophers.com/concurrency-slower/)", shows how to use Go's testing, benchmarking, and profiling tools to improve the performance of a concurrent implementation of a function. April 2017.
- Understand the performance of your Go apps using the [pprof package](http://blog.golang.org/profiling-go-programs)
## Porting - Heap Dumps
- [heapdump13](heapdump13)
- Shannon Pekary, "[Why GOPP](https://github.com/spekary/gopp/blob/master/Why.md)," an attempt to create - [heapdump14](heapdump14)
a 'class' keyword that simply makes a struct to also be an interface to make porting code from object-oriented languages much easier. - [heapdump15](https://github.com/golang/go/wiki/heapdump15)
## Slices ## Contributing to the Go Project
- Mike Schinkel, "[Type Compatibility with Interface Slices](https://mikeschinkel.me/type-compatibility-with-interface-slices/)", December 2018 - Start by reading the [Go Contribution Guidelines](https://golang.org/doc/contribute.html)
- Richard Warburton, "[Should Go 2.0 support slice comparison?](https://gist.github.com/krolaw/3205a3139d423b0c39e24b98c923b1a1)," an argument to treat slices as structs for equality comparison, ignoring backing arrays. - 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)
- "[Deduplicating a slice is too cumbersome](https://gist.github.com/kevinburke/ad20587e6694acb9251f7d7e25c77078)," a 10-line function in your source code vs. e.g. Ruby's `uniq` function. - An archive of [design documents is also available](DesignDocuments)
- "[Counter-intuitive behaviour of Go variadic functions](https://gist.github.com/dpinela/f7fdeb0ce3e1f0b4f495917ad9210a85),", January 2018, stumbling blocks encountered when expanding slices into argument lists. - Go releases happen on ~6 month intervals. [See here for more information](Go-Release-Cycle)
- Want to know more about how the [Go source sub-repositories are structured?](SubRepositories)
## Syntax - The Go project requires that all code be reviewed before it is submitted.
- Read more about our [code review practices](CodeReview)
- André Hänsel, "[If were to make my own Go…](https://blog.creations.de/?p=223)", August 2017 - If you're commenting on code under review, please read [these guidelines](CodeReviewComments)
- Issues
## Time - Bug reports and feature requests should be filed using the [GitHub issue tracker](https://github.com/golang/go/issues)
- Want to understand how we [handle issues that are reported?](HandlingIssues)
- John Graham-Cumming, “[How and Why the Leap Second Affected Cloudflare DNS](https://blog.cloudflare.com/how-and-why-the-leap-second-affected-cloudflare-dns/),” January 2017, about timing across leap seconds ([#12914](https://golang.org/issue/12914)). - Project Dashboards
- [Go Builds Dashboard info](DashboardBuilders)
## Tooling - [Performance Dashboard info](PerfDashboard)
- Jonathan Ingram, “[gofmt is not opinionated enough](https://gist.github.com/jonathaningram/2b62022844348f3407518dd3a180ef42)”, August 2017, about ongoing debates between developers regarding code style because `gofmt` is not opinionated enough. ## Platform Specific Information
- Jean-Laurent de Morlhon, "[Pourquoi Maurice ne doit surtout pas coder en GO](https://www.youtube.com/watch?v=LIFZPzupwgs), talk about Go from a java developper perspective ("go dep" is not enough,...), slides are in english.
- See [MinimumRequirements](MinimumRequirements) for minimum platform requirements of current Go ports.
## Type System - Considering porting Go to a new platform? [Read our porting policy first](PortingPolicy)
- [Mobile](Mobile)
- Mike Schinkel, "[Type Compatibility with Interface Slices](https://mikeschinkel.me/type-compatibility-with-interface-slices/)", December 2018 - [Ubuntu](Ubuntu)
- Sam Whited, “[Faking Enumeration Types with Consts and Unexported Types](https://gist.github.com/SamWhited/6cdbc49b4562e1a1b0526af523f5c5d7)”, July 2017, about attempting to ensure compile time correctness of values provided to an API using the type system. - [Windows](Windows)
- Andreas Matuschek, "[Operator Methods](https://gist.github.com/maj-o/9cab355e3e5e4f6f66dbf0a8f24cd13a)", July 2017, just to remember that there are problems with types without corresponding operators ([#19770](https://github.com/golang/go/issues/19770)). - [WindowsBuild](WindowsBuild)
- Leigh McCulloch, "[Go Experience Report: Pointers](https://leighmcculloch.com/go-experience-reports/pointers.html)", July 2017, about pointers being used for both transferring ownership and indicating a lack of value. - [WindowsCrossCompiling](WindowsCrossCompiling)
- Jack Lindamood, "[Interface wrapping method erasure](https://medium.com/@cep21/interface-wrapping-method-erasure-c523b3549912)", July 2017, about the loss of information due to type wrappers - [WindowsDLLs](WindowsDLLs)
- Sam Whited, “[The Case for interface{}](https://blog.samwhited.com/2017/08/the-case-for-interface/)”, Aug 2017, two examples of using interface and why one is bad (but necessary) and one is good. - [GoArm](GoArm)
- James Frasché, "[Sum types experience report](https://gist.github.com/jimmyfrasche/ba2b709cdc390585ba8c43c989797325)", Aug 2017, issues caused by inability to restrict to a closed set of types - [ChromeOS](ChromeOS)
- Robin Eklind, "[Specific use cases. In response to James Frasché's 'Sum types experience report'](https://gist.github.com/jimmyfrasche/ba2b709cdc390585ba8c43c989797325#gistcomment-2181410)", Aug 2017, issues caused by inability to restrict to a closed set of types - [Darwin](Darwin)
- Rick Branson, "[Implicit Pointers = Explicitly Bad](https://docs.google.com/document/d/1va7f4YvExK4mNBmMt2RMg1SNSHyljc8ARVp2ATKtBwU/edit?usp=sharing)", Sep 2017, issues encountered with parameters/variables with interface types as implicit references - [DragonFly BSD](DragonFly-BSD)
- Chewxy, "[Tensor Refactor: A Go Experience Report](https://blog.chewxy.com/2017/09/11/tensor-refactor/)", September 2017, issues regarding discussion of a type system in Go - [FreeBSD](FreeBSD)
- Walter Schulze, "[Generic functions cannot be passed as values](https://gist.github.com/awalterschulze/e3999f8cfa29b246c35a651a2be4d121)", September 2017 - [Linux](Linux)
- Walter, Schulze, "[For Sum Types: Multiple return parameters are overrated](https://awalterschulze.github.io/blog/post/sum-types-over-multiple-returns/)", September 2017 - [NativeClient](NativeClient)
- Nicolas, Boulay "[Sum type not always the best choice (Typed tagless-final interpretations)](https://gist.github.com/nicolasboulay/a8ee4a65e8c2cc110c20e6d24e838e86), October 2017 - [NetBSD](NetBSD)
- Eduard Urbach, "[Type-casting interface{} to chan interface{}](https://github.com/blitzprog/go-channel-type-casting)", October 2017 - [OpenBSD](OpenBSD)
- David Vennik, "[Unjumbling Golang OOP primitives](https://gist.github.com/l0k1verloren/344956daedb434094e9af2c21ff9376c)", April 20, 2018 - The problem of the lack of structuring in OOP primitives - dummy functions and redundant boilerplate type bindings. - [Plan 9](Plan9)
- Jelte Fennema, "[Fixing the billion dollar mistake in Go by borrowing from Rust](https://getstream.io/blog/fixing-the-billion-dollar-mistake-in-go-by-borrowing-from-rust/)", June 14, 2018 - Nil pointer dereferences cause panics in production - it would be great if the type system would catch some of those. - [Solaris](Solaris)
## Typed nils ## Release Specific Information
- David Cheney, "[Typed nils in Go 2](https://dave.cheney.net/2017/08/09/typed-nils-in-go-2)", August 2017. - [Go1point1Gotchas](Go1point1Gotchas)
- [OlderVersions](OlderVersions)
## Vendoring
Notes:
- Jeremy Loy, "[Go Modules and Vendoring](https://github.com/golang/go/issues/27227#issuecomment-420428896)", September 2018.
- 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.