Build modern, production-ready web services in Go
About the Book
With its focus on simplicity and getting things done, Go is a great language for developing performant, robust and maintainable applications. Production Go first teaches the basics of the Go language, then discusses how to bring an application from development to real users. The authors draw from years of experience running high-volume real-world Go applications to explain the tricks behind making—and keeping—Go applications performant, robust and maintainable.
- Writing Code
- Editor Integrations
- (Optional) Linters and Correctness Tooling
- Program Structure
- Variables and Constants
- Basic Data Types
- Conditional Statements
- Exported Names
- Error Handling
- Reading Input
- Writing Output
Style and Error Handling
- Error Handling
- Wrapping Up
- Appending to Strings
- Splitting strings
- Counting and finding substrings
- Advanced string functions
- Ranging over a string
- A very brief history of string encodings
- Strings are byte slices
- Printing strings
- Runes and safely ranging over strings
- Text Normalization
- Goroutines in web handlers
- Race conditions
- Why do we need tests?
- Writing Tests
- Testing HTTP Handlers
- Generating Coverage Reports
- Writing Examples
- A simple benchmark
- Comparing benchmarks
- Resetting benchmark timers
- Benchmarking memory allocations
- Modulo vs Bitwise-and
- Go Guru
- Race Detector
- Go Report Card
- Pinning tools with Go modules
- Keep Go Up to Date
- HTTP Strict Transport Security (HSTS)
- Content Security Policy (CSP)
- SQL Injection
- See Also
Going into Production
- Continuous Integration & Continuous Deployment (CI/CD)
- Further Reading
The Leanpub 60-day 100% Happiness Guarantee
Within 60 days of purchase you can get a 100% refund on any Leanpub purchase, in two clicks.
See full terms
80% Royalties. Earn $16 on a $20 book.
We pay 80% royalties. That's not a typo: you earn $16 on a $20 sale. If we sell 5000 non-refunded copies of your book or course for $20, you'll earn $80,000.
(Yes, some authors have already earned much more than that on Leanpub.)
In fact, authors have earnedover $12 million USDwriting, publishing and selling on Leanpub.
Learn more about writing on Leanpub
Free Updates. DRM Free.
If you buy a Leanpub book, you get free updates for as long as the author updates the book! Many authors use Leanpub to publish their books in-progress, while they are writing them. All readers get free updates, regardless of when they bought the book or how much they paid (including free).
Most Leanpub books are available in PDF (for computers) and EPUB (for phones, tablets and Kindle). The formats that a book includes are shown at the top right corner of this page.
Finally, Leanpub books don't have any DRM copy-protection nonsense, so you can easily read them on any supported device.