Gorm is a popular ORM library in Golang that supports the most commonly used Relational Databases. In this article, I want to talk about a subtle problem in the unique index support for Gorm. For more context, let’s first briefly discuss Database Indexes and how Gorm supports them. Feel free to skip the next few […]
Today while working on a Golang code-base at work, I came across an anomaly, or at least that’s what I thought. To give you a context, I wrote a simple function that linearly traverses a slice to find an element based on some criteria. The function then returns the element and leftover slice without the […]
The imports in Golang are the full path of the package including the domain name. It is common to host the packages on Github and use it for import as well. However, there are two problems with it.