Preface
Chapter 1: Go and the Operating System
The structure of the book
The history of Go
Why learn Go?
Go advantages
Is Go perfect?
What is a preprocessor?
The godoc utility
Compiling Go code
Executing Go code
Two Go rules
You either use a Go package or do not include it
There is only one way to format curly braces
Downloading Go packages
Unix stalin, stdout, and stderr
About printing output
Using standard output
Getting user input
About := and =
Reading from standard input
Working with command-line arguments
About error output
Writing to log files
Logging levels
Logging facilities
Log servers
A Go program that sends information to log files
About log.Fatal()
About log.Panic()
Error handling in Go
The error data type
Error handling
Additional resources
Exercises
Summary
Chapter 2: Understanding Go Internals
The Go compiler
Garbage Collection
The Tricolor algorithm
More about the operation of the Go Garbage Collector
Unsafe code
About the unsafe package
Another example of the unsafe package
Calling C code from Go
Calling C code from Go using the same file
Calling C code from Go using separate files
The C code
The Go code
Mixing Go and C code