Go Recipes for Developers: Top techniques and practical solutions for real-life Go programming problems
- Length: 350 pages
- Edition: 1
- Language: English
- Publisher: Packt Publishing
- Publication Date: 2024-12-30
- ISBN-10: 1835464394
- ISBN-13: 9781835464397
Master essential Go programming techniques step by step with expert-led recipes and ready-to-use solutions for common challenges
Key Features
- Discover easy-to-implement recipes for all types of programming projects
- Learn idiomatic solutions to common problems
- Gain comprehensive knowledge of core Go concepts
- Purchase of the print or Kindle book includes a free PDF eBook
Book Description
With its simple syntax and sensible conventions, Go has emerged as the language of choice for developers in network programming, web services, data processing, and other settings. This practical guide helps engineers leverage Go through up-to-date recipes that solve common problems in day-to-day programming. Drawing from three decades of distributed systems engineering and technical leadership at companies like Red Hat, Burak Serdar brings battle-tested expertise in building robust, scalable applications.
He starts by covering basics of code structure, describing different approaches to organizing packages for different types of projects. You’ll discover practical solutions to engineering challenges in network programming, dealing with processes, databases, data processing pipelines, and testing. Each chapter provides working solutions and production-ready code snippets that you can seamlessly incorporate into your programs while working in sequential and concurrent settings. The solutions leverage the more recent additions to the Go language, such as generics and structured logging. Most of the examples are developed using the Go standard library without any third-party packages.
By the end of this book, you’ll have worked through a collection of proven recipes that will equip you accelerate your Go development journey.
What you will learn
- Understand how to structure projects
- Find out how to process text with Go tools
- Discover how to work with arrays, slices, and maps
- Implement robust error handling patterns
- Explore concurrent data processing for Go programs
- Get up to speed with how to control processes
- Integrate Go applications with databases
- Understand how to test, benchmark, and profile Go programs
Who this book is for
This book is for any developer with a basic understanding of the Go language. If you’re a senior developer, you can use it as a reference for finding useful examples they can apply to different use cases.
Table of Contents
- Project Organization
- Working with Strings
- Working with Date and Time
- Working with Arrays, Slices, and Maps
- Working with Types, Structs, and Interfaces
- Working with Generics
- Concurrency
- Errors and Panics
- The Context Package
- Working with Large Data
- Working with JSON
- Processes
- Network Programming
- Streaming Input/Output
- Databases
- Logging
- Testing, Benchmarks, and Profiling