In this book, we will be exploring intermediate aspects of Golang. The book will suddenly take a practical turn, so prepare for the ride.
What you’ll be learning:
Concurrent Programming in Go and Why it’s Important: Theoretically, in computer science, concurrency is the ability of different parts or units of a program, algorithm, or problem to be executed out-of-order or in partial order without affecting the outcome. In easier terms, if you want your business logic to run faster than you hard-coded it, you must adopt concurrent programming. Let’s see this in practice.
Working with Data in Go: Data manipulation is a fundamental aspect of software development, and Go provides powerful tools and libraries to work with various types of data. In this section, we will explore several essential data-related topics in Go:
Advanced-Data Structures in Go: We already saw Go maps, slices, and arrays in the Go Essentials course. Now, let’s leverage custom data structures functionality in Go.
Writing unit tests for Golang: The importance of writing tests for your software cannot be overemphasized. A school of thought called Test-Driven Development suggests that developers should start building software by writing code first. There are two approaches to writing tests:
writing tests for a program to check whether the functions in it perform as expected
writing tests during problem-solving to build software that passes the test.
You may adopt both, using each of them whenever it is suitable. Let’s explore both scenarios.
Advanced Logging in Go: Logging plays a pivotal role in software engineering, providing insight into the inner workings of a program. It's an indispensable tool when building distributed systems, storage engines, message queues, version control systems, replication mechanisms, and consensus algorithms. In Golang, you have the built-in
log
package for basic logging needs. However, for more advanced and optimized logging, third-party packages like Logrus and Uber's Zap come to the rescue. In this article, we'll explore the importance of logging, the basic usage of Go's log package, and delve into structured logging with the slog package.
This intermediate-level book dives deeper into Golang's features and concepts, enabling readers to develop more complex and robust applications.
Practical examples, exercises, and a hands-on project will ensure that you build confidence and competence in intermediate Golang programming.