x

Confirm Download

Simultaneous file downloading works best in FireFox, Chrome, and Safari browsers. Please keep this window open until all downloads are complete. Some customers prefer using file download managers for Chrome or Firefox to better manage large and multiple file downloads.

Cancel Download

Introduction to Go Programming

      • Hello world!  (Free)

        We'll learn how to create the fundamental program using Go and getting a first glimpse of the programming environment.
      • 00:05:35

      • Typical Go Directory Structure  (Free)

        Go enforces a fairly strict project layout that the 'go' tool expects to be able to find source code in. In this section I'll show how to set up a brand new Go project.
      • 00:04:21

      • Where to Get Help  (Free)

        One of Go's strengths is documentation. In this section I'll review the online Go documentation and the godoc tool.
      • 00:02:16

      • Variables, Simple Types and Declarations  (Free)

        All programs have variables but how they are declare and get values varies widely. Go is both staticly typed and tries to have the feel of a dynamic language like Python. In this section we'll go through the various way of declaring variables and talk about simple, built-it Go types.
      • 00:08:44

      • String Things

        In this section we'll learn about Go strings, their relationship with characters and runes, and how to manipulate strings.
      • 00:04:58

      • The Switch Statement

        The switch statement will be familiar to many non-Go programmers but Go's twist on switch makes it more powerful (and a little more complex). This section explains all the things that can be done with switch.
      • 00:06:03

      • The for loop

        Unlike languages with for, do, while, repeat etc. Go only has for but it does the job of all the other loop types.
      • 00:04:47

      • Function Definitions

        Here you'll learn how to create Go functions, how multiple arguments are handled, how multiple return values are handled, the use of defer and how to deal with variable numbers of arguments.
      • 00:14:18

      • Arrays and Slices

        This section shows how Go handles arrays, and, more importantly, teaches Go's powerful slice type.
      • 00:14:45

      • Maps

        Go's most complex built-it types is a map (sometimes called a hash, dictionary or associative array). This section shows how to make maps and how to use them.
      • 00:09:21

      • Byte Slices

        In this section I'll show the many uses of []byte (the byte slice).
      • 00:07:28

      • Errors

        Go has a built in error type that is used throughout the Go standard packages. This section will teach how to create custom errors and the idiomatic way to process errors in Go.
      • 00:07:48

      • Goroutines and Channels

        Go's greatest superpower is easy concurrency which comes through goroutines and the go statement. In this section we'll try out the go statement and see how channels are used to pass data back and forth between goroutines.
      • 00:12:08

      • The Select Keyword

        This section shows how Go's select keyword is used to handle multiple simultaneous communications and forms the core of many concurrent programs.
      • 00:08:53

      • Multiple Readers, Multiple Writers

        Goroutines can share a single channel and multiple goroutines can read or write from the channel. This section will show how that works and how it can be exploited to make workload balancer in just a few lines of code.
      • 00:17:10

      • Closing Channels

        Closing a channel signals that it won't be used any more. This section will teach how closing a channel can itself by used for communication and coordination.
      • 00:04:41

      • Nil Channels and Their Uses

        This section will show that a nil channel (once that hasn't been defined) actually has uses when combined with the select keyword.
      • 00:05:55

      • Buffered Channels

        Most uses of channels in Go are unbuffered (i.e. two goroutines must simultaneously agree to send and receive on the same channel for communication to happen). But sometimes buffered channels (that can store a fixed number of messages) are useful. This section will teach when.
      • 00:08:04

      • Types and the Type Keyword

        Making your own types is fundamental. This section shows how to make types and how to initialize them and then how to write functions that operate on those types.
      • 00:10:38

      • Interfaces

        Go's other great power (apart from concurrency) comes from its approach to 'object orientation'. This section shows how Go's interfaces work, how to define your own interfaces and how to use them.
      • 00:08:19

      • interface{} and type assertions and type switches

        Here you'll learn about interface{} (the empty interface) and its use in Go as a placeholder for any type. You'll also learn how to use type assertions and the switch statement to determine the type of a variable.
      • 00:06:14

      • Packages and Initialization

        This section explains how Go organizes code into packages and how package-level initialization is performed.
      • 00:13:18

      • The Go Tool Chain

        This section explains the entire go tool chain and its various functions in building, testing, formatting code. In particular, you'll learn how to refactor code with 'go fmt'.
      • 00:06:54

      • Unit Testing

        The 'go' tool has built in support for unit testing and Go's testing package provides all the tools necessary for writing robust unit tests for any Go package or type. This section will teach you how to write and run Go unit tests.
      • 00:19:20

      • The Standard fmt Package

        Formatting output is vital to any program. This section introduces the Go fmt package and how to use it.
      • 00:08:38

      • The Standard io, bufio & os packages

        I/O is also a vital part of any program. The standard io and os packages abstract io and provide access to operating system functions like creating files or deleting them.
      • 00:13:59

      • The standard net http Package

        Go has a complete web server and web client (including SSL/TLS) as part of its standard library. It's powerful enough to build real web servers and code that access web sites or APIs. This section shows how.
      • 00:10:32

      • The Standard Encoding json Package

        Since handling JSON data is so common these days talk about how Go handles JSON reading and writing and then use the JSON package along with net/http to make a small web server that servers a JSON based API. I'll make a small program in Go that is a web server that returns IP, Port and User-Agent information as JSON and write a client program that gets the information and outputs it.
      • 00:13:07

      • Standard Strings, strconv & Sort Packages

        Since we spend so much time handling strings look at useful functions from within these two packages. In particular, strings.Reader that turns a string into an io.Reader, Split and Join, Contains, EqualFold, Fields, Trim functions. From strconv talk about Atoi and Itoa, the Parse functions.
      • 00:16:24

      • The Standard Sync Package

        Although Go's fundamental concept is that you should share data by communicating (via channels) it can sometimes be handy to use a simple Mutex. This section shows the use of the standard sync package that contains mutexes.
      • 00:11:54

      • The Standard Log Package

        Logging is pretty fundamental and Go has a small log package. Talk about its use and specifically the Printf and Fatalf functions. Show how the flags work to adjust the output format.
      • 00:05:23

      • The Standard Flag Package

        If you're writing a tool in Go it'll likely need configuration. You might use JSON (covered above) but command-line arguments are often needed. In this section we'll learn how to use the flag package.
      • 00:04:45

      • The Standard Time Package

        There's no escaping time and luckily Go's time package is fully featured. This section will look at time, formatting, parsing and time calculations, and how to create timers and tickers.
      • 00:05:46

      • The Standard cgo Package

        Sometimes it's important to link to programs written in C. Go's cgo package allows direct linking with C programs. In this section we'll learn how to link Go to the FreeImage library to perform image manipulation.
      • 00:05:25

Introduction to Go Programming

  • Publisher: O'Reilly Media
  • Released: October 2014
  • Run time: 5 hours 19 minutes

Get going with the Go programming language! This fast-paced video course takes you from your first Go program all the way to writing highly concurrent programs. Go is known for its simple syntax, rich library, easy concurrency, and scalability. In this course, host John Graham-Cumming teaches you the complete language, and shows you how to use Go’s two special features: goroutines for concurrency and interfaces for composition.

Brimming with example programs that solve real-world problems, this video covers Go through worked examples that explain language features such as channels. You’ll also learn about Go’s standard packages for building web applications, accessing web APIs, manipulating strings, handling dates and times, and linking Go to existing C programs.

  • Learn about variables, simple types, and declarations
  • Understand Go’s control structures, including if and switch statements
  • Create Go functions, and learn how multiple arguments and return values are handled
  • Learn built-in types, including maps (associative arrays) and its powerful slice type
  • Use goroutines and channels for easy concurrency
  • Dive into Go’s other great power: interfaces (its approach to object orientation)
  • Learn about Go’s tool chain and its built-in support for unit testing

John Graham-Cumming is a wandering programmer who's lived in the UK, California, New York, and France. Along the way he’s worked for a succession of technology start-ups, written the award-winning open source POPFile email program, and churned out articles for publications such as The Guardian, Dr Dobbs, and Linux Magazine.