Practical Go

Learn the skills you’ll need day-to-day to work with the Go programming language.

Introduction

This workshop helps developers get up to speed with Go from the ground up, covering basic language syntax through to concurrency. Along the way, you learn best practices for project layout, testing, reusability, and dependency management. You get practical, hands-on experience tailoring your development environment for Go development, building CLI tools, writing HTTP servers, and developing concurrent programs with goroutines and channels. The aim of this course is to build your confidence in starting new projects in Go.

Topics

The following are the topics covered in this course:

  • Language Basics

    • Syntax and Types

    • Packages

    • Arrays and Iteration

    • Slices

    • Maps

    • Pointers

    • Functions

    • Errors

    • Structs

    • Interfaces

  • Command Line Tools

  • Testing

  • Interfaces

  • HTTP Servers

  • Dependencies

  • Concurrency Basics

    • Goroutines

    • Channels

What to Expect

The workshop follows these guiding principles:

  • We put heavy emphasis on learning by doing.

  • We link to online resources as needed so that you can refer to them on your own afterwards.

  • Don't be afraid to ask for help from the instructor or from a classmate.

  • There is often more than one way to accomplish a task so your solution may look different from the instructor's or classmates--and that's okay.

The material is divided into sections with one or more topics. The typical workflow is as follows:

  1. Topic introduction

  2. Exercise

  3. Sample solution walkthrough

  4. Topic summary and/or related next steps

Minimum Qualifications

This workshop is aimed at developers with some level of experience with other languages and/or with some exposure to Go. We won't spend a lot of time explaining basic programming concepts (conditionals, looping, arrays, maps, etc) as it is expected you will have worked with them before.

You are also expected to know how to:

  • Work with a shell environment (bash, Windows PowerShell, cmd.exe, etc)

  • Work your way around your file system (cd, ls, mkdir, mv, etc)

  • Work with environment variables

If you are completely new to Go (as in "I've never even seen the syntax or written a 'Hello World' program"), you can get a feel for the syntax with the following resources:

What You Will Need

You will also need to install the following:

Installing Go

There are several resources available online to help you install and configure Go on your Linux, Mac/Linux machine. If you're having trouble, check out the following:

About the Instructor

Guiding you through this journey will be Johnny Boursiquot, author of the well-liked Go Standard Library Solutions course available from Packt Publishing. Johnny is an active member and leader within the Go community. He runs the Baltimore Metro Area Go User Group, leads the Baltimore Chapter of the GoBridge organization, and speaks regularly at conferences and meetups. He loves to teach and to welcome new members into the community. Reach him on Twitter @jboursiquot.