-
Notifications
You must be signed in to change notification settings - Fork 2
Home
This wiki is the companion to a collection of Go code files that implement a workshop for learning Go basics. The code files are divided into Git branches that represent a progression of learning, from "hello world!" to a fully fledged web server making use of Go's concurrency features to implement asynchronous processing.
To maximize your learning, we recommend that you follow along with the moderator, writing your own code to match each lesson as it's being discussed. However because the lessons are implemented as a collection of branches, it's possible at any given time to jump ahead or back.
The code on each branch represents a working state described on the Lesson Structure page. Whether you're following the moderator or just jumping into branches to follow along, we encourage you to play with the code -- try to break it, alter it, etc. If you get into trouble, you can always roll back.
And if you're unfamiliar with Git, we have a Git Cheatsheet to help you feel confident.
In order to be ready to learn all the material in the workshop, you'll need a workstation that has Git, Go, and an editor set up to edit Go code. The Pre Work page describes how to set up these things on Linux, Windows, and macOS.
To follow along with the workshop, clone this repo into $GOPATH and then
checkout a new copy of the first lesson on a branch called workshop
:
$> cd $GOPATH/src && mkdir -p github.com/solarwinds && cd github.com/solarwinds
$> git clone https://github.com/solarwinds/golessons
$> cd golessons
$> git checkout lesson1/0-start
$> git checkout -b workshop
From there, you'll add to the code yourself, building along with the moderator.
In this workshop we will use both make
and go
to run Go code. Keep
in mind that you can always run a single file with go run
:
go run main.go
or pass flags:
go run main.go --friendly --port=6565
or build with make and run:
make && ./golessons --friendly --port=6565