Book Image

Mastering Go - Second Edition

By : Mihalis Tsoukalos
Book Image

Mastering Go - Second Edition

By: Mihalis Tsoukalos

Overview of this book

Often referred to (incorrectly) as Golang, Go is the high-performance systems language of the future. Mastering Go, Second Edition helps you become a productive expert Go programmer, building and improving on the groundbreaking first edition. Mastering Go, Second Edition shows how to put Go to work on real production systems. For programmers who already know the Go language basics, this book provides examples, patterns, and clear explanations to help you deeply understand Go’s capabilities and apply them in your programming work. The book covers the nuances of Go, with in-depth guides on types and structures, packages, concurrency, network programming, compiler design, optimization, and more. Each chapter ends with exercises and resources to fully embed your new knowledge. This second edition includes a completely new chapter on machine learning in Go, guiding you from the foundation statistics techniques through simple regression and clustering to classification, neural networks, and anomaly detection. Other chapters are expanded to cover using Go with Docker and Kubernetes, Git, WebAssembly, JSON, and more. If you take the Go programming language seriously, the second edition of this book is an essential guide on expert techniques.
Table of Contents (20 chapters)
Title Page

Exercises and links

  • Learn more about the unsafe standard Go package by visiting its documentation page at https://golang.org/pkg/unsafe/.
  • Visit the web site of DTrace at http://dtrace.org/.
  • Use strace(1) on your Linux machine to inspect the operation of some standard UNIX utilities such as cp(1) and ls(1). What do you see?
  • If you are using a macOS machine, use dtruss(1) to see how the sync(8) utility works.
  • Write your own example where you use your own C code from a Go program.
  • Write a Go function and use it in a C program.
  • You can find more information about the functions of the runtime package by visiting https://golang.org/pkg/runtime/.
  • Reading research papers might be difficult but it is very rewarding. Please download the On-the-Fly Garbage Collection: An Exercise in Cooperation paper and read it. The paper can be found in many places, including https://dl.acm.org/citation...