Skip to content

Latest commit

 

History

History
98 lines (50 loc) · 4.97 KB

README.md

File metadata and controls

98 lines (50 loc) · 4.97 KB

Single Day Go Overview

In this class, we will cover the key architectural and design aspects that distinguish Go from other imperative languages, including Go's approach to object oriented programming and concurrency. We will also learn how these characteristics make Go a strong choice for applications that demand fast development, reliability, and scalability.

Full lesson material, taught over multiple two-day courses, can be found in the Ultimate Go section. Please see the gotraining README for contact information.

Examples marked with an asterisk are from golang.org, provided under a BSD license.

For a great talk/video that reinforces many of these ideas, see Andrew Gerrand's Code that Grows with Grace.

Syntax and Type Semantics

Easy to learn and reason about, trivial to machine-process.

Variables, Builtins, and Type Safety (Source)

Constants (Source)

Structs (Source)

Pointers and Reference Types

Safe and simple. Strings and slices solve many traditional pointer use-cases.

Arrays (Source)

Slices (Source)

Appending (Source)

Strings (Source)

Variadic Functions (Source)

Maps (Source)

Pointers (Source)

Peano Pointers (Source) *

Methods and Interfaces

Allow your code to grow gracefully without you.

Methods (Source)

Fibonacci Closures (Source) *

First-Class Methods (Source)

Interfaces (Source)

Embedding and Composition

An extension/wrapping mechanism based on composition, not inheritance.

Embedding (Source)

Embedding and Interfaces (Source)

Composition (Source)

Concurrency

Goroutines and channels for convenient and safe concurrent algorithms.

Concurrent Pi (Source) *

Concurrent Prime Sieve (Source) *

Select (Source)

Standard Library

Excellent value for its volume. I/O is especially powerful.

Packages and Exporting

Errors (Source)

Error Variables (Source)

Behavior As Error Context (Source)

Basic cURL) (Source)

Enhanced cURL) (Source)

HTTP Server (Source)

Tooling

Universally adopted formatting, testing, and build tools. Many analysis tools are available (and custom tools are easy to write).

Tooling Overview


All material is licensed under the Apache License Version 2.0, January 2004.