Go in Action
William Kennedy with Brian Ketelsen and Erik St. Martin
  • MEAP began March 2014
  • Publication in October 2015 (estimated)
  • ISBN 9781617291784
  • 300 pages (estimated)
  • printed in black & white

Go in Action introduces the Go language, guiding you from inquisitive developer to Go guru. The book begins by introducing the unique features and concepts of Go. (We assume you're up to speed with another programming language already, so don't expect to spend a lot of time rehearsing stuff you already know.) Then, you'll get hands-on experience writing real-world applications including web sites and network servers, as well as techniques to manipulate and convert data at speeds that will make your friends jealous. In the final chapters, you'll go in-depth with the language and see the tricks and secrets that the Go masters are using to make their applications perform. For example, you'll learn to use Go's powerful reflection libraries and work with real-world examples of integration with C code.

Table of Contents show full

1. Introducing Go

1.1. Solving modern programming challenges with Go

1.1.1. Development Speed

1.1.2. Concurrency

1.1.3. Go’s type system

1.1.4. Memory management

1.2. Hello, Go

1.2.1. Introducing the Go Playground

1.3. Summary and best practices

2. Go Quick Start

2.1. Program architecture

2.2. Main package

2.3. Search package

2.3.1. search.go

2.3.2. feed.go

2.3.3. match.go / default.go

2.4. RSS matcher

2.5. Summary

3. Packaging and Tooling

3.1. Packages

3.1.1. Package naming conventions

3.1.2. Package main

3.2. Imports

3.2.1. Remote imports

3.2.2. Named imports

3.3. Init

3.4. Using Go tools

3.5. Going further with Go developer tools

3.5.1. Go vet

3.5.2. Go format

3.5.3. Go documentation

3.6. Collaborating with other Go developers

3.6.1. Creating repositories for sharing

3.7. Dependency management

3.7.1. Vendoring dependencies

3.7.2. Introducing gb

3.8. Summary

4. Arrays, Slices and Maps

4.1. Array internals and fundamentals

4.1.1. Internals

4.1.2. Declaring and initializing

4.1.3. Working with arrays

4.1.4. Multidimensional arrays

4.1.5. Passing arrays between functions

4.2. Slice internals and fundamentals

4.2.1. Internals

4.2.2. Creating and initializing

4.2.3. Working with slices

4.2.4. Multidimensional slices

4.2.5. Passing slices between functions

4.3. Map internals and fundamentals

4.3.1. Internals

4.3.2. Creating and initializing

4.3.3. Working with maps

4.3.4. Passing maps between functions

4.4. Summary

5. Go’s Type System

5.1. User-defined types

5.2. Methods

5.3. The nature of types

5.3.1. Built-in types

5.3.2. Reference types

5.3.3. Struct types

5.4. Interfaces

5.4.1. Standard library

5.4.2. Implementation

5.4.3. Method sets

5.4.4. Polymorphism

5.5. Type embedding

5.6. Exporting and unexporting identifiers

5.7. Summary

6. Concurrency

6.1. Concurrency versus parallelism

6.2. Goroutines

6.3. Race conditions

6.4. Locking shared resources

6.4.1. Atomic functions

6.4.2. Mutexes

6.5. Channels

6.5.1. Unbuffered channels

6.5.2. Buffered channels

6.6. Summary

7. Concurrency Patterns

7.1. Runner

7.2. Pooling

7.3. Work

7.4. Summary

8. Standard Library

8.1. Documentation and Source Code

8.2. Logging

8.2.1. Log Package

8.2.2. Customized Loggers

8.2.3. Conclusion

8.3. Encoding/Decoding

8.3.1. Decoding JSON

8.3.2. Encoding JSON

8.3.3. Conclusion

8.4. Input and Output

8.4.1. Writer and Reader Interfaces

8.4.2. Working Together

8.4.3. Simple Curl

8.4.4. Conclusion

8.5. Summary

9. Testing and benchmarking

9.1. Unit testing

9.1.1. Basic unit test

9.1.2. Table tests

9.1.3. Mocking calls

9.1.4. Testing endpoints

9.2. Examples

9.3. Benchmarking

9.4. Summary

10. Testing and Benchmarking

About the Technology

Many of the normal concerns you face as an application developer are amplified by the challenges of web-scale concurrency, real-time performance expectations, multi-core support, and efficiently consuming services without constantly managing I/O blocks. Although it's possible to solve most of these issues with existing languages and frameworks, Go is designed to handle them right out of the box, making for a more natural and productive coding experience. Developed at Google for its own internal use, Go now powers dozens of nimble startups, along with name brands like Canonical, Heroku, SoundCloud, and Mozilla, who rely on highly performant services for their infrastructure.

What's inside

  • Get started with Go
  • Real use cases you'll face in day-to-day development
  • Master Go distinctives like go routines and channels
  • Integrate go with all your other code

About the reader

This book assumes you're a working developer proficient with another language like Java, Ruby, Python, C#, or C++.

About the authors

William Kennedy is a seasoned software developer, author of the blog GoingGo.Net, and organizer for the Go-Miami and Miami MongoDB meetups. Brian Ketelsen and Erik St. Martin are the organizers of GopherCon, an annual conference for Go developers, and coauthors of the Go-based Skynet framework. Both Brian and Eric work with Go daily in a high-stakes production setting.

Manning Early Access Program (MEAP) Read chapters as they are written, get the finished eBook as soon as it’s ready, and receive the pBook long before it's in bookstores.
MEAP combo $44.99 pBook + eBook
MEAP eBook $35.99 pdf + ePub + kindle

FREE domestic shipping on three or more pBooks