GoFragments hosts a collection of Go annotated example programs.
Each fragment is a program ready to be compiled, and try to convey the most idiomatic way to write Go about a specific situation.
These fragments are classified in 3 categories:
- fundamentals examples
- concurrency examples
- network/web examples
For each program a description and the expected output (when feasible in this format for this latter) are presented .
A "search facility" (based on a reversed index of both programs names and their content) should simplify your exploration.
This collection has been gathered from roaming through the Golang environment to find pertinent approach to real problems. When I am not the original author, I have most of the time tried to refer to him or her with a link to their article (when known or available).
Any comments and suggestions are welcome to improve this service, hoping it will be useful to both new Go developers and more experienced one.
I will keep on adding new fragments, as I will keep on roaming Go.
I'm personally enjoying reviewing the source code in the Go Standard Library, it is a fantastic (Open Source) resource. Many Go idioms are implemented there, some are really astute... invaluable and highly recommended to new comers who want to become proficient in this pragmatic language.