Type assertions vs. type conversions in Go
In this article, we will explore type assertion and type conversion operations in Go using some examples.
Error handling in Go: Best practices
Tackling errors in Go requires a different approach than the conventional methods in other mainstream programming languages, like JavaScript, which uses the try...catch statement, or Python with its try… except…
Advanced unit testing patterns in Go
In this article, we’ll examine a few patterns for testing in Go that will help you write effective tests for any project. We’ll cover concepts like mocking, test fixtures, test…
Exploring Go mocking methods and the GoMock framework
Testing can be challenging when dealing with external dependencies such as databases, APIs, and other services. That’s where mocking comes in. By simulating these dependencies, developers can test their code…
A deep dive into unit testing in Go
In this tutorial, we’ll cover how to write unit tests in Go using the built-in testing package and several external tools. By the end of this article, you’ll understand concepts…
Go long by generating PDFs in Golang with Maroto
PDF generation is an important task that is required for various types of applications. Efficiently generating PDFs at scale can be a complex task. However, Go, being known for its…
How to build a RESTful API with Docker, PostgreSQL, and go-chi
Go-chi is a lightweight router library for building HTTP services in Go. It is especially useful for when you want the benefits of modular request handling without the batteries that…
Debugging Go with VS Code
Debugging is used to detect and fix faults in programs, preventing them from performing incorrectly after being deployed to production. When there are several tightly-connected modules, debugging becomes even more…
Golang Interfaces Explained
For the beginner, Golang interface is the whole concept that make difficult to learn, and may make pretty confusing. In this tutorial I want help anyone in a few things:…
Quick tip: Implementing an in-memory cache in Go
When your application is a single binary running on a single machine, a simple, effective, and no-dependency way to do this is by persisting the data in memory using a…