Go by Example (@gobyexample) profile picture

Your hands-on guide to Go.

Joined September 2012
Added initial support for linking to Go Playground. Click the gopher to try it out: gobyexample.com/hello-world. Thanks @jaywgraves /cc @golang
1
3
We're having another issue with site and are working to resolve it now.
We had an ~11m outage of the gobyexample.com site - sorry about the inconvenience.
@myitzhaksamuel I'm not familiar with any tutorials of that type yet. You could try Google-translating through github.com/astaxie/build-web…
Basic of reading files in #golang: gobyexample.com/reading-file…. Too much to cover in one page but this should get you started.
1
@ryandotsmith I'm not sure - what do you think? The format currently requires <= 58 chars and lots of printing...
2
Time formatting & parsing in #golang: gobyexample.com/time-formatt…. I was really confused by these until I understood the example-based approach.
JSON in #golang: gobyexample.com/json. This tripped me up when I was getting started, especially the type assertions for using ad-hoc data.
3
1
Errors in #golang: gobyexample.com/errors. I love Go's use of return values for errors and natural support for data-conveying errors.
1
`cat examples.txt | grep -v "#" | wc -l` => 60. Building into some network client/server examples soon: github.com/mmcgrana/gobyexam….
1
#golang has excellent support for string formatting in the printf tradition: gobyexample.com/string-forma….
1
1
Basic (pseudo)random number generation mechanics in #golang: gobyexample.com/random-numbe….
Just updated the epoch example to show how to go from a Unix timestamp to a time as well as the previously-shown other direction.
Getting the seconds / milliseconds / nanoseconds since the Unix epoch in #golang: gobyexample.com/epoch. A basic but common task.
2
Time and duration basics in #golang: gobyexample.com/time. Still to come: time parsing / formatting and epochs.
Examples of regular expressions in #golang: gobyexample.com/regular-expr…. One of the best areas for a "by example" approach IMO.
3
A quick look at string functions in #golang: gobyexample.com/string-funct…. Very good built-in support here from Go.
1
1
Collection functions in #golang: gobyexample.com/collection-f…. Programming without generics takes some getting used to.
1
1
1