Articles tagged with golang | TwiN

Remove Accents from Characters in Go

Users love trying to find workarounds to break your applications. Removing accents from each characters in a string is one of the many ways to make it harder for them to break your application.

Useful Go Projects

It's easy to miss all Go has to offer, so here's a list of some libraries that'll make yours even simpler

Bit Fields: Squishing Booleans Using Bitwise Operations

Bitwise operations, while complicated to understand at first, can become quite useful when you want to simplify the way you manipulate data. Using bit fields is one such approach; it allows combining multiple booleans, sometimes referred to as flags, into a single integer.

Migrating Personal Projects To Kubernetes and Rewriting Website in Go

I've finally decided to migrate my personal projects to Kubernetes

Gatus: Automated Health Dashboard

A service health dashboard written in Go that is meant to be used as a docker image with a custom configuration file.

Mocking HTTP requests in Go

Testing gives us the peace of mind to allow external contributors or even ourselves in the future to modify code without worrying about breaking any functionality. The problem is that when it comes to testing features that depend on making HTTP requests to third party services, we tend to just keep our eyes closed.

Writing a Simple Reverse Proxy in Go

Writing a reverse proxy has never been this easy

Go Concurrency: GoRoutines, Worker Pools and Throttling Made Simple

Channels, WaitGroup, Goroutines and worker pools are all very scary principles for those who haven't been in contact with them before. Fear no more, for this article will clear up your doubts.

How to add colors to your console/terminal output in Go

The simplest way to add colors to your console/terminal output in Go, without external libraries

Reducing Docker image size by using multi-stage builds

Leveraging Docker multi-stage build can allow you to drastically reduce the size of your Docker images

Add a timeout to any function in Go

Whether it be to protect your TP99 or provide a good user experience, timeouts can provide all sort of benefits. This tutorial will show you how you can add a timeout to any function in Go.

Match a Simple Pattern Without Regex in Go

There's many reasons why you could need to support wildcard patterns, and with Go's regex not being the fastest, sometimes you need to get creative. Don't look too far, Go's standard library is here for you.

Performance, Benchmarking and Allocations in Go

When performance matters, unnecessary memory allocations are usually the first suspect, but without benchmarking, you'll never know.