The principle goal of this workshop it to get you excited about Go! We’ll be focussing on two key areas: object oriented development in Go, and the powerful primitives which make concurrent programming in Go a breeze.
- Introduction: built-in types, variable declaration, function and custom types.
- Object oriented development: methods, interfaces, embedding and composition.
- Concurrency: goroutines and channels.
In each section we'll walk through a number of examples and code samples, and will work through some coding exercises in pairs, either using a local Go installation or the Go Playground.
This workshop is designed for folks who have some basic knowledge of Go, but not necessarily any practical experience with it. Attendees are also expected to have practical experience with the principles behind Object Oriented software development (in any language).
I will recap some basics at the beginning of the workshop, but you'll get more out of it if you already have knowledge of variable declaration, functions, and struct types. I suggest you watch the first half of my recent introductory talk on Go (the "Data & Types" section), or a least look through the slide deck.
As long as you have a working laptop (or a friend with one, as we'll be pairing for the exercises), then you’re good to go. You don’t even need Go installed on your machine, because you can use the online Go Playground instead for the exercises.
There are templates available for each of the exercises. If you've cloned this
repo under your $GOPATH
then you can just edit and run the template file in
place. Alternatively, follow the link to the template already set up in the Go
Playground, and work from there instead.
- The Basics: source / playground
- Object Orientation
- Methods: source / playground
- Interfaces: source / playground
- Embedding: source / playground
- Concurrency
- Goroutines: source / playground
- Channels: source / playground
Example solutions are also available, but don't look at those until you've had a go yourself!
Except where otherwise noted, the content of this repository is licensed under a Creative Commons Attribution-ShareAlike 4.0 International License.