A collection of Go recipes


Go Cookbook

What is this?

This is a collection of recipes for the Go language. It aims to distill the knowledge of the Go community into simple and clear examples of best practice.

Where do the recipes come from?

Some of the recipes have their origins in threads on the Go Nuts mailing list go-nuts. Others are distilled from existing open source code, the Go source code and sources such as the Go Wiki.

There seems to be no organisation...

At the moment, while there are very few recipes, I am just leaving the recipes unorganised. When there are enough I will start grouping and tagging them and provide an index into the cookbook. At that point I may add the necessary config to make this content publishable using a system like Jekyll (or Hastie)

Can I reuse the recipes?

Yes. All content in this Go Cookbook is made available via the CC0 public domain license. See LICENSE

How can I contribute?

You can edit a recipe or contribute a new one by submitting a pull request. Please limit each pull request to a single recipe so it's easy to manage and discuss. Feel free to add yourself to the CREDITS file if you wish. Don't add yourself to the AUTHORS file. If your contribution is deemed substantial enough then one of the existing authors will add you.

Do note that in order for any non-trivial changes to be merged (as a rule of thumb, additions larger than about 5 lines), an explicit Public Domain Dedication needs to be on record from you. Please include a copy of the statement found in the WAIVER file with your pull request.

Can I suggest new recipes?

Yes. Open a new issue and write your suggestion there. Add the 'recipe suggestion' label to help people who want to contribute to find ideas for recipes.

no rights reserved