O'Reilly logo

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Troubleshooting Go Application Development

Video Description

Get productive in Go quickly by dodging common roadblocks

About This Video

  • Learn Go best practices, making it easier to get help and read others' code.
  • Avoid the biggest gotchas developers from other languages run into.
  • Use concurrency without losing data or crashing your program

In Detail

Go is a powerful, general-purpose language that is exceptional for writing anything from servers to command-line utilities. Meant to replace languages such as Java and C++, its performance and accessibility have found an eager audience in developers from compiled and interpreted languages alike.

Much of Go's power comes from its simplicity. Although a high-level language, it doesn't have much in the way of bells and whistles. Newcomers from all languages tend to trip over the same design decisions that are less common among other languages.

In this course, you will learn to effortlessly surmount these hurdles and become more productive quickly, writing fast, stable code and, hopefully, having more fun coding than ever before!

Table of Contents

  1. Chapter 1 : Fixing Compiler Errors
    1. The Course Overview 00:05:51
    2. Unexpected Literal, Expecting Type 00:01:05
    3. Unexpected Newline, Expecting Comma or } 00:01:55
    4. No New Variables on Left Side Of := 00:01:45
    5. Multiple-Value in Single-Value Context 00:01:09
    6. Undefined: fmt 00:00:46
    7. Main Redeclared in This Block 00:01:53
    8. Declared and Not Used 00:00:55
    9. Imported and Not Used 00:00:48
  2. Chapter 2 : Concurrency
    1. Deadlocks 00:02:14
    2. Missing Output from Goroutine 00:02:07
    3. Variable Used by a Deferred Function 00:02:10
    4. Wait Groups 00:02:20
  3. Chapter 3 : Dependencies
    1. No Install Location Outside GOPATH 00:02:15
    2. Cannot Find Package in Any Of 00:01:10
    3. Upstream Changes 00:01:34
    4. Dependencies Using cgo 00:02:11
  4. Chapter 4 : Go gotchas
    1. Zero Value for Non-Existent Map Keys 00:01:50
    2. Syntax Error: _, i := nums Used as Value 00:00:59
    3. Copy Argument Order Is Not Intuitive 00:01:20
    4. Using Break with a Select Block 00:02:26
    5. Using Range with a Slice Returns the Index as the First Argument 00:01:18
    6. Un-Exported Types Do Not Marshal to JSON 00:01:34
    7. The Map Type Is Not Thread Safe 00:01:27
    8. Unexpected Results Using Variables in Goroutine 00:01:28
  5. Chapter 5 : Writing More Idiomatic Go
    1. Don’t Panic 00:02:21
    2. Don’t Ignore Errors 00:03:10
    3. Using Backticks for String Literals to Avoid Excessive Quoting 00:03:58
    4. Making a Map into a Set 00:02:17
    5. Do Not Use Mutable Global Variables 00:03:14
  6. Chapter 6 : Never Crash in Production!
    1. Index Errors 00:03:07
    2. Nil Pointer Errors 00:02:53
    3. Memory Leaks 00:04:41
    4. Failing to Check Type Assertion Success 00:03:41
  7. Chapter 7 : Interfaces in Go
    1. Concrete Type Versus Dynamic Type 00:05:06
    2. Does Not Implement – Method 00:03:50
    3. Does Not Implement – Pointer 00:02:28
  8. Chapter 8 : Tips on Go’s Built-in Variable Types
    1. Mixing Constants and Types 00:03:07
    2. Variable Shadowing 00:03:06
    3. time.Duration 00:04:11
    4. Converting Between Integers to Strings 00:03:11
    5. Iterating over Strings 00:03:41