An all-in-one guide to gRPC-Gateway
gRPC-Gateway is a plugin that generates a reverse proxy server for gRPC services that convert Restful/JSON into gRPC and vice versa. In other words, gRPC-Gateway will create a layer over…
Go generics: Past designs and present release features
Generic programming is also known as parametric polymorphism in other programming languages. It is a way of reducing function duplication by writing “common functions” with support for multiple type parameters/arguments.…
Exploring structs and interfaces in Go
In Go, there are several built-in types for identifiers, also known as predeclared types. They include Boolean, string, numeric (float32, float64, int, int8, int16, int32, complex), and so many other…
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…