---
title: "Diving into Go: A Five-Week Intro"
date: 2014-04-25T00:00:00+00:00
draft: false
canonical_url: https://www.viget.com/articles/diving-into-go-a-five-week-intro/
---

One of my favorite parts of being a developer here at Viget is our
[developer book club](https://viget.com/extend/confident-ruby-a-review).
We've read [some](http://www.confidentruby.com/)
[fantastic](http://www.poodr.com/)
[books](http://martinfowler.com/books/nosql.html), but for our most
recent go-round, we decided to try something different. A few of us have
been interested in the [Go programming language](https://golang.org/)
for some time, so we decided to combine two free online texts, [*An
Introduction to Programming in Go*](http://www.golang-book.com/books/intro/) and
[*Go By Example*](https://gobyexample.com/), plus a few other resources,
into a short introduction to the language.
[Chris](https://viget.com/about/team/cjones) and
[Ryan](https://viget.com/about/team/rfoster) put together a curriculum
that I thought was too good not to share with the internet at large.

## Week 1

Chapter 1: [Getting Started](http://www.golang-book.com/books/intro/1)

-   Files and Folders
-   The Terminal
-   Text Editors
-   Go Tools
-   **Go By Example**
    -   [Hello World](https://gobyexample.com/hello-world)

Chapter 2: [Your First Program](http://www.golang-book.com/books/intro/2)

-   How to Read a Go Program

Chapter 3: [Types](http://www.golang-book.com/books/intro/3)

-   Numbers
-   Strings
-   Booleans
-   **Go By Example**
    -   [Values](https://gobyexample.com/values)
    -   [Random Numbers](https://gobyexample.com/random-numbers)
    -   [String Functions](https://gobyexample.com/string-functions)
    -   [String Formatting](https://gobyexample.com/string-formatting)
    -   [Regular
        Expressions](https://gobyexample.com/regular-expressions)

Chapter 4: [Variables](http://www.golang-book.com/books/intro/4)

-   How to Name a Variable
-   Scope
-   Constants
-   Defining Multiple Variables
-   An Example Program
-   **Go By Example**
    -   [Variables](https://gobyexample.com/variables)
    -   [Constants](https://gobyexample.com/constants)
    -   [Number Parsing](https://gobyexample.com/number-parsing)
    -   [Time](https://gobyexample.com/time)
    -   [Epoch](https://gobyexample.com/epoch)
    -   [Time Formatting /
        Parsing](https://gobyexample.com/time-formatting-parsing)

Chapter 5: [Control Structures](http://www.golang-book.com/books/intro/5)

-   For
-   If
-   Switch
-   **Go By Example**
    -   [For](https://gobyexample.com/for)
    -   [If/Else](https://gobyexample.com/if-else)
    -   [Switch](https://gobyexample.com/switch)
    -   [Line Filters](https://gobyexample.com/line-filters)

Chapter 6: [Arrays, Slices and Maps](http://www.golang-book.com/books/intro/6)

-   Arrays
-   Slices
-   Maps
-   **Go By Example**
    -   [Arrays](https://gobyexample.com/arrays)
    -   [Slices](https://gobyexample.com/slices)
    -   [Maps](https://gobyexample.com/maps)
    -   [Range](https://gobyexample.com/range)
-   **Blog Posts**
    -   [Go Slices: usage and
        internals](https://blog.golang.org/go-slices-usage-and-internals)
    -   [Arrays, Slices (and strings): The mechanics of
        'append'](https://blog.golang.org/slices)

## Week 2

Chapter 7: [Functions](http://www.golang-book.com/books/intro/7)

-   Your Second Function
-   Returning Multiple Values
-   Variadic Functions
-   Closure
-   Recursion
-   Defer, Panic & Recover
-   **Go By Example**
    -   [Functions](https://gobyexample.com/functions)
    -   [Multiple Return
        Values](https://gobyexample.com/multiple-return-values)
    -   [Variadic Functions](https://gobyexample.com/variadic-functions)
    -   [Closures](https://gobyexample.com/closures)
    -   [Recursion](https://gobyexample.com/recursion)
    -   [Panic](https://gobyexample.com/panic)
    -   [Defer](https://gobyexample.com/defer)
    -   [Collection
        Functions](https://gobyexample.com/collection-functions)

Chapter 8: [Pointers](http://www.golang-book.com/books/intro/8)

-   The \* and & operators
    -   new
-   **Go By Example**
    -   [Pointers](https://gobyexample.com/pointers)
    -   [Reading Files](https://gobyexample.com/reading-files)
    -   [Writing Files](https://gobyexample.com/writing-files)

## Week 3

Chapter 9: [Structs and Interfaces](http://www.golang-book.com/books/intro/9)

-   Structs
-   Methods
-   Interfaces
-   **Go By Example**
    -   [Structs](https://gobyexample.com/structs)
    -   [Methods](https://gobyexample.com/methods)
    -   [Interfaces](https://gobyexample.com/interfaces)
    -   [Errors](https://gobyexample.com/errors)
    -   [JSON](https://gobyexample.com/json)

Chapter 10: [Concurrency](http://www.golang-book.com/books/intro/10)

-   Goroutines
-   Channels
-   **Go By Example**
    -   [Goroutines](https://gobyexample.com/goroutines)
    -   [Channels](https://gobyexample.com/channels)
    -   [Channel Buffering](https://gobyexample.com/channel-buffering)
    -   [Channel
        Synchronization](https://gobyexample.com/channel-synchronization)
    -   [Channel Directions](https://gobyexample.com/channel-directions)
    -   [Select](https://gobyexample.com/select)
    -   [Timeouts](https://gobyexample.com/timeouts)
    -   [Non-Blocking Channel
        Operations](https://gobyexample.com/non-blocking-channel-operations)
    -   [Closing Channels](https://gobyexample.com/closing-channels)
    -   [Range over
        Channels](https://gobyexample.com/range-over-channels)
    -   [Timers](https://gobyexample.com/timers)
    -   [Tickers](https://gobyexample.com/tickers)
    -   [Worker Pools](https://gobyexample.com/worker-pools)
    -   [Rate Limiting](https://gobyexample.com/rate-limiting)

## Week 4

-   **Videos**
    -   [Lexical Scanning in
        Go](https://www.youtube.com/watch?v=HxaD_trXwRE)
    -   [Concurrency is not
        parallelism](https://blog.golang.org/concurrency-is-not-parallelism)
-   Blog Posts
    -   [Share Memory By
        Communicating](https://blog.golang.org/share-memory-by-communicating)
    -   [A GIF decoder: an exercise in Go
        interfaces](https://blog.golang.org/gif-decoder-exercise-in-go-interfaces)
    -   [Error handling and
        Go](https://blog.golang.org/error-handling-and-go)
    -   [Defer, Panic, and
        Recover](https://blog.golang.org/defer-panic-and-recover)

## Week 5

Chapter 11: [Packages](http://www.golang-book.com/books/intro/11)

-   Creating Packages
-   Documentation

Chapter 12: [Testing](http://www.golang-book.com/books/intro/12)

Chapter 13: [The Core Packages](http://www.golang-book.com/books/intro/13)

-   Strings
-   Input / Output
-   Files & Folders
-   Errors
-   Containers & Sort
-   Hashes & Cryptography
-   Servers
-   Parsing Command Line Arguments
-   Synchronization Primitives
-   **Go By Example**
    -   [Sorting](https://gobyexample.com/sorting)
    -   [Sorting by
        Functions](https://gobyexample.com/sorting-by-functions)
    -   [URL Parsing](https://gobyexample.com/url-parsing)
    -   [SHA1 Hashes](https://gobyexample.com/sha1-hashes)
    -   [Base64 Encoding](https://gobyexample.com/base64-encoding)
    -   [Atomic Counters](https://gobyexample.com/atomic-counters)
    -   [Mutexes](https://gobyexample.com/mutexes)
    -   [Stateful
        Goroutines](https://gobyexample.com/stateful-goroutines)
    -   [Command-Line
        Arguments](https://gobyexample.com/command-line-arguments)
    -   [Command-Line Flags](https://gobyexample.com/command-line-flags)
    -   [Environment
        Variables](https://gobyexample.com/environment-variables)
    -   [Spawning Processes](https://gobyexample.com/spawning-processes)
    -   [Exec'ing Processes](https://gobyexample.com/execing-processes)
    -   [Signals](https://gobyexample.com/signals)
    -   [Exit](https://gobyexample.com/exit)

Chapter 14: [Next Steps](http://www.golang-book.com/books/intro/14)

-   Study the Masters
-   Make Something
-   Team Up

***

Go is an exciting language, and a great complement to the Ruby work we
do. Working through this program was a fantastic intro to the language
and prepared us to create our own Go programs for great justice. Give it
a shot and let us know how it goes.
