/dev/reading
Category

Go

17 books
Order by
View
by Teiva Harsanyi

Spot errors in your Go code you didn’t even know you were making and boost your productivity by avoiding common mistakes and pitfalls.

100 Go Mistakes and How to Avoid Them shows you how to:

  • Dodge the most common mistakes made by Go developers
  • Structure and organize your Go application
  • Handle data and control structures efficiently
  • Deal with errors in an idiomatic manner
  • Improve your concurrency skills
  • Optimize your code
  • Make your application production-ready and improve testing quality

100 Go Mistakes and How to Avoid Them puts a spotlight on common errors in Go code you might not even know you’re making. You’ll explore key areas of the language such as concurrency, testing, data structures, and more—and learn how to avoid and fix mistakes in your own projects. As you go, you’ll navigate the tricky bits of handling JSON data and HTTP services, discover best practices for Go code organization, and learn how to use slices efficiently.

Go Programming for Hackers and Pentesters
by Tom Steele, Chris Patten and Dan Kottmann

Black Hat Go explores the darker side of Go, the popular programming language revered by hackers for its simplicity, efficiency, and reliability. It provides an arsenal of practical tactics from the perspective of security practitioners and hackers to help you test your systems, build and automate tools to fit your needs, and improve your offensive security skillset, all using the power of Go.

You’ll begin your journey with a basic overview of Go’s syntax and philosophy and then start to explore examples that you can leverage for tool development, including common network protocols like HTTP, DNS, and SMB. You’ll then dig into various tactics and problems that penetration testers encounter, addressing things like data pilfering, packet sniffing, and exploit development. You’ll create dynamic, pluggable tools before diving into cryptography, attacking Microsoft Windows, and implementing steganography.

You'll learn how to:

  • Make performant tools that can be used for your own security projects
  • Create usable tools that interact with remote APIs
  • Scrape arbitrary HTML data
  • Use Go’s standard package, net/http, for building HTTP servers
  • Write your own DNS server and proxy
  • Use DNS tunneling to establish a C2 channel out of a restrictive network
  • Create a vulnerability fuzzer to discover an application’s security weaknesses
  • Use plug-ins and extensions to future-proof products
  • Build an RC2 symmetric-key brute-forcer
  • Implant data within a Portable Network Graphics (PNG) image

Are you ready to add to your arsenal of security tools? Then let’s Go!

Data-Driven Performance Optimization
by Bartlomiej Plotka

With technological advancements, fast markets, and higher complexity of systems, software engineers tend to skip the uncomfortable topic of software efficiency. However, tactical, observability-driven performance optimizations are vital for every product to save money and ensure business success.

With this book, any engineer can learn how to approach software efficiency effectively, professionally, and without stress. Author Bartłomiej Płotka provides the tools and knowledge required to make your systems faster and less resource-hungry. Efficient Go guides you in achieving better day-to-day efficiency using Go. In addition, most content is language-agnostic, allowing you to bring small but effective habits to your programming or product management cycles.

This book shows you how to:

  • Clarify and negotiate efficiency goals
  • Optimize efficiency on various levels
  • Use common resources like CPU and memory effectively
  • Assess efficiency using observability signals like metrics, logging, tracing, and (continuous) profiling via open source projects like Prometheus, Jaeger, and Parca
  • Apply tools like go test, pprof, benchstat, and k6 to create reliable micro and macro benchmarks
  • Efficiently use Go and its features like slices, generics, goroutines, allocation semantics, garbage collection, and more!
Building complex systems with asynchronicity and eventual consistency
by Michael Stack

Event-driven architecture in Golang is an approach used to develop applications that shares state changes asynchronously, internally, and externally using messages. EDA applications are better suited at handling situations that need to scale up quickly and the chances of individual component failures are less likely to bring your system crashing down. This is why EDA is a great thing to learn and this book is designed to get you started with the help of step-by-step explanations of essential concepts, practical examples, and more.

You'll begin building event-driven microservices, including patterns to handle data consistency and resiliency. Not only will you learn the patterns behind event-driven microservices but also how to communicate using asynchronous messaging with event streams. You'll then build an application made of several microservices that communicates using both choreographed and orchestrated messaging.

By the end of this book, you'll be able to build and deploy your own event-driven microservices using asynchronous communication.

What you will learn

  • Understand different event-driven patterns and best practices
  • Plan and design your software architecture with ease
  • Track changes and updates effectively using event sourcing
  • Test and deploy your sample software application with ease
  • Monitor and improve the performance of your software architecture

Who this book is for

This hands-on book is for intermediate-level software architects, or senior software engineers working with Golang and interested in building asynchronous microservices using event sourcing, CQRS, and DDD. Intermediate-level knowledge of the Go syntax and concurrency features is necessary.

by Nathan Youngman and Roger Peppé

Get Programming with Go introduces you to the powerful Go language without confusing jargon or high-level theory. By working through 32 quick-fire lessons, you'll quickly pick up the basics of the innovative Go programming language!

A Fun Projects-based Approach to Golang Programming
by Nicolas Modrzyk

Go beyond the basics of Go and build complete applications using open-source libraries or the Go programming language by Google. This book will take you deep into the memory lane of the Go language with crunchy details straight from outer space.

The applications in this book include the framework for a 2D Go-based game, an image random generator Rest API, financial time series handling for trading, a Kubernetes operator, a Blockchain coding and more. You'll also get refreshers on Go constructs and useful code tricks to build performant projects, and develop an HTTP based cloud ready image generator.

Each chapter will be organized in the following format: what the particular application looks like; requirements and user stories of our example program; an introduction to the Go libraries or frameworks used; and the actual implementation of the example program, including common pitfalls and their solutions.

Go Crazy will open your eyes to a new world of practical applications for Go. After reading the book, you will be able to apply your Golang knowledge to build your own crazy projects.  Free source code will be available on this book's Apress GitHub page.

What You'll Learn

  • Compile and inline other programming languages, including GPU coding.
  • Handle Kubernetes clusters via your own operator
  • Write Go to code against Ethereum based block chains.
  • Write intelligent bot code to get you rich and famous.

Who This Book Is For

Go programmers both experienced and novice.

by Matt Butcher and Matt Farina

Go in Practice guides you through 70 real-world techniques in key areas like package management, microservice communication, and more. Following a cookbook-style Problem/Solution/Discussion format, this practical handbook builds on the foundational concepts of the Go language and introduces specific strategies you can use in your day-to-day applications.

by Sau Sheong Chang

Go Web Programming teaches you how to build scalable, high-performance web applications in Go using modern design principles.

by Hüseyin Babal

Build super fast and super secure microservices with the gRPC high-performance messaging protocol and powerful Go language.

In gRPC Microservices in Go you’ll learn:

  • Designing and implementing resilient microservice architecture
  • Testing microservices
  • Deploying microservices to the cloud with modern orchestration tools
  • Monitoring and overseeing microservices

The powerful gRPC Remote Procedure Call framework delivers superior speed and security over protocols like REST. When paired with Golang’s low-level efficiency and flexibility, gRPC and Go become a killer combination for latency-sensitive microservices applications.

gRPC Microservices in Go shows you how to utilize these powerful tools to build production-grade microservices. You’ll learn to develop microservice inter-service communication patterns that are powered by gRPC, design backward compatible APIs, and apply hexagonal architecture to microservices.

by James Cutajar

Concurrency doesn’t need to be confusing. Start writing concurrent code that improves performance, scales up to handle large volumes of data, and takes full advantage of modern multi-processor hardware.

Too many developers think concurrency is extremely challenging.

Learn Concurrent Programming with Go is here to prove them wrong! This book uses the easy-to-grasp concurrency tools of the Go language to demonstrate principles and techniques, steadily teaching you the best practices of effective concurrency. Techniques learned in this book can be applied to other languages.

In Learn Concurrent Programming with Go you will learn how to:

  • Implement effective concurrency for more responsive, higher performing, scalable software
  • Avoid common concurrency problems such as deadlocks and race conditions
  • Manage concurrency using goroutines, mutexes, readers-writer locks, and more
  • Identify concurrency patterns such as pipelining, worker pools, and message passing
  • Discover advantages, limits, and properties of parallel computing
  • Improve your Go coding skills with advanced multithreading topics

Concurrent programming allows multiple tasks to execute and interact simultaneously, speeding up performance and reducing user wait time. In

Learn Concurrent Programming with Go, you’ll discover universal principles of concurrency, along with how to use them for a performance boost in your Go applications. Expert author James Cutajar starts with the basics of modeling concurrency in your programs, demonstrates differences between message passing and memory sharing, and even introduces advanced topics such as atomic variables and futexes.

An Idiomatic Approach to Real-World Go Programming
by Jon Bodner

Go has rapidly become the preferred language for building web services. Plenty of tutorials are available to teach Go's syntax to developers with experience in other programming languages, but tutorials aren't enough. They don't teach Go's idioms, so developers end up recreating patterns that don't make sense in a Go context. This practical guide provides the essential background you need to write clear and idiomatic Go.

No matter your level of experience, you'll learn how to think like a Go developer. Author Jon Bodner introduces the design patterns experienced Go developers have adopted and explores the rationale for using them. This updated edition also shows you how Go's generics support fits into the language.

This book helps you:

  • Write idiomatic code in Go and design a Go project
  • Understand the reasons behind Go's design decisions
  • Set up a Go development environment for a solo developer or team
  • Learn how and when to use reflection, unsafe, and cgo
  • Discover how Go's features allow the language to run efficiently
  • Know which Go features you should use sparingly or not at all
  • Use Go's tools to improve performance, optimize memory usage, and reduce garbage collection
  • Learn how to use Go's advanced development tools
Learn to Build Professional Web Applications with Go
by Alex Edwards

Let’s Go is a clear, concise and easy-to-follow guide to web development with Go.

It packs in everything you need to know about best practices, project structure and practical code patterns — without skimping on important details and explanations.

Go is a great language for building web applications. But teaching yourself from blog posts and the standard library documentation can be a big time-sink and leave you with more questions than answers.

You might be wondering things like:

  • Where can I see a concrete example of a real-world web application?
  • How is it best to structure and organize my code?
  • How do I manage and version control dependencies?
  • And how do I effectively test my web application?
  • Let’s Go answers these questions for you — and a whole lot more — helping you get up to speed quickly and saving you months of research and experimentation.

The book walks through the start-to-finish build of a complete working application, helping you to learn by doing. You’ll get practical experience implementing common real-life code patterns, the topics that you’re learning about are put in context, and you’ll end up with a well-structured codebase that you can adapt for your own future work.

By the end of the book, you’ll have all the knowledge and confidence that you need to build your own professional, production ready, web applications.

Advanced patterns for building APIs and web applications in Go
by Alex Edwards

Let’s Go Further helps you extend and expand your knowledge of Go — taking you beyond the basics and guiding you through advanced patterns for developing, managing and deploying APIs and web applications.

Let’s Go Further guides you through the start-to-finish build of a modern JSON API in Go – from project setup to deployment in production.

As well as covering fundamental topics like sending and receiving JSON data, the book goes in-depth and explores practical code patterns and best practices for advanced functionality like implementing graceful shutdowns, managing background tasks, reporting metrics, and much more.

You’ll learn a lot about topics that are often important to your real-world work, but which are rarely discussed in beginner-level courses and aren’t fully explained by the official Go documentation. Let’s Go Further also goes beyond development. It outlines tools and techniques to help manage your project on an ongoing basis, and also gives you a step-by-step playbook for deploying your API to a live production server.

By the end of the book you’ll have all the knowledge you need to create robust and professional APIs which act as backends for SPAs and native mobile applications, or function as stand-alone services.

If you read and enjoyed the first Let’s Go book, this course should be a great fit for you and an ideal next step in mastering Go.

Code Secure and Reliable Network Services from Scratch
by Adam Woodbeck

Combining the best parts of many other programming languages, Go is fast, scalable, and designed for high-performance networking and multiprocessing. In other words, it’s perfect for network programming.

Network Programming with Go will help you leverage Go to write secure, readable, production-ready network code. In the early chapters, you’ll learn the basics of networking and traffic routing. Then you’ll put that knowledge to use as the book guides you through writing programs that communicate using TCP, UDP, and Unix sockets to ensure reliable data transmission.

As you progress, you’ll explore higher-level network protocols like HTTP and HTTP/2 and build applications that securely interact with servers, clients, and APIs over a network using TLS.

You'll also learn:

  • Internet Protocol basics, such as the structure of IPv4 and IPv6, multicasting, DNS, and network address translation
  • Methods of ensuring reliability in socket-level communications
  • Ways to use handlers, middleware, and multiplexers to build capable HTTP applications with minimal code
  • Tools for incorporating authentication and encryption into your applications using TLS
  • Methods to serialize data for storage or transmission in Go-friendly formats like JSON, Gob, XML, and protocol buffers
  • Ways of instrumenting your code to provide metrics about requests, errors, and more
  • Approaches for setting up your application to run in the cloud (and reasons why you might want to)

Network Programming with Go is all you’ll need to take advantage of Go’s built-in concurrency, rapid compiling, and rich standard library.

Covers Go 1.15 (Backward compatible with Go 1.12 and higher)

The Complete Guide to Programming Reliable and Efficient Software Using Golang
by Adam Freeman

Best-selling author Adam Freeman explains how to get the most from Go, starting from the basics and building up to the most advanced and sophisticated features. You will learn how Go builds on a simple and consistent type system to create a comprehensive and productive development experience that produces fast and robust applications that run across platforms.

Go, also known as Golang, is the concise and efficient programming language designed by Google for creating high-performance, cross-platform applications. Go combines strong static types with simple syntax and a comprehensive standard library to increase programmer productivity, while still supporting features such as concurrent/parallel programming.

Each topic is covered in a clear, concise, no-nonsense approach that is packed with the details you need to learn to be truly effective. Chapters include common problems and how to avoid them.

What You Will Learn

  • Gain a solid understanding of the Go language and tools
  • Gain in-depth knowledge of the Go standard library
  • Use Go for concurrent/parallel tasks
  • Use Go for client- and server-side development

Who This Book Is For

Experienced developers who want to use Go to create applications

Develop, deliver, discuss, design, and go again
by Joel Holmes

Build and upgrade an automated software delivery pipeline that supports containerization, integration testing, semantic versioning, automated deployment, and more.

In Shipping Go you will learn how to:

  • Develop better software based on feedback from customers
  • Create a development pipeline that turns feedback into features
  • Reduce bugs with pipeline automation that validates code before it is deployed
  • Establish continuous testing for exceptional code quality
  • Serverless, container-based, and server-based deployments
  • Scale your deployment in a cost-effective way
  • Deliver a culture of continuous improvement

Shipping Go is a hands-on guide to shipping Go-based software. Author Joel Holmes shows you the easy way to set up development pipelines, fully illustrated with practical examples in the powerful Go language. You’ll put continuous delivery and continuous integration into action, and discover instantly useful guidance on automating your team’s build and reacting with agility to customer demands. Your new pipelines will ferry your projects through production and deployment, and also improve your testing, code quality, and production applications.

by Alan A. A. Donovan and Brian W. Kernighan

The Go Programming Language is the authoritative resource for any programmer who wants to learn Go. It shows how to write clear and idiomatic Go to solve real-world problems. The book does not assume prior knowledge of Go nor experience with any specific language, so you'll find it accessible whether you're most comfortable with JavaScript, Ruby, Python, Java, or C++.

  • The first chapter is a tutorial on the basic concepts of Go, introduced through programs for file I/O and text processing, simple graphics, and web clients and servers.
  • Early chapters cover the structural elements of Go programs: syntax, control flow, data types, and the organization of a program into packages, files, and functions. The examples illustrate many packages from the standard library and show how to create new ones of your own. Later chapters explain the package mechanism in more detail, and how to build, test, and maintain projects using the go tool.
  • The chapters on methods and interfaces introduce Go's unconventional approach to object-oriented programming, in which methods can be declared on any type and interfaces are implicitly satisfied. They explain the key principles of encapsulation, composition, and substitutability using realistic examples.
  • Two chapters on concurrency present in-depth approaches to this increasingly important topic. The first, which covers the basic mechanisms of goroutines and channels, illustrates the style known as communicating sequential processes for which Go is renowned. The second covers more traditional aspects of concurrency with shared variables. These chapters provide a solid foundation for programmers encountering concurrency for the first time.
  • The final two chapters explore lower-level features of Go. One covers the art of metaprogramming using reflection. The other shows how to use the unsafe package to step outside the type system for special situations, and how to use the cgo tool to create Go bindings for C libraries.