Skip to content
This repository has been archived by the owner on Aug 28, 2023. It is now read-only.
Trevor Rosen edited this page Dec 4, 2017 · 15 revisions

Lesson Approach

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.

Pre-Work

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.

Getting Started

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.

Running Go Code

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

Clone this wiki locally