benhalstead / gotraining

Introduction to Go

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Go Training

Training materials for beginners to Go. Each package represents a general topic area and each source file is runnable (has it's own main function)

Important

This repo should not be used as an example of how to organise your project or structure your source files. For a better example of organisation and structure, clone the Granitic source repository

The following is the suggested reading order:

Foundations

  1. Getting output from your code

Types, variables and control structures

  1. Declaring and intialising variables
  2. Basic types
  3. Constants
  4. if-else statements
  5. for statements
  6. switch statements
  7. Functions

Data structures

  1. Slices and arrays
  2. Maps
  3. Pointers
  4. Structs
  5. Methods and receivers
  6. Interfaces
  7. Tags

Error handling

  1. Errors
  2. Panic

Testing

  1. Unit tests

Advanced functions

  1. Variadic functions
  2. Defer
  3. Functions as types
  4. Closures and anonymous functions

Concurrency

  1. goroutines
  2. Channels
  3. Mutex and atomic
  4. Context

Essential packages

These are some of the packages you'll find yourself using most frequently.

  1. bufio (Godoc)
  2. encoding/json (Godoc)
  3. net/http (Godoc)
  4. regexp (Godoc)
  5. strconv (Godoc)
  6. strings (Godoc)
  7. time (Godoc)

About

Introduction to Go


Languages

Language:Go 100.0%