one-day-overview/

directory
v0.0.0-...-a855ea4 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Mar 21, 2016 License: Apache-2.0

README

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

Enhanced cURL

HTTP Server

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.

Directories

Path Synopsis
misc
curl1
Sample program to show how to write a simple version of curl using the io.Reader and io.Writer interface support.
Sample program to show how to write a simple version of curl using the io.Reader and io.Writer interface support.
curl2
Sample program to show how to write a simple version of curl using the io.Reader and io.Writer interface support.
Sample program to show how to write a simple version of curl using the io.Reader and io.Writer interface support.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL