The Go programming language, or Golang, is well-known for its simplicity, performance, and support for concurrency. However, like any language, writing efficient, maintainable, and readable code in Go requires adherence to certain best practices. Here are some conventions and tips to keep in mind...
Testing is a crucial part of software development, ensuring that your code works as expected and reducing the number of bugs and issues. In Go, testing is built into the language, making it straightforward to write tests. This blog post will provide a comprehensive guide on testing in Go, covering...
Error handling is a critical aspect of writing robust and reliable software applications. In Go, error handling is designed to be explicit, making it easier to identify and address potential issues. In this blog post, we'll explore the best practices and patterns for handling errors in Go,...
Go has been a language that prides itself on simplicity and efficiency. However, it has long been criticized for its lack of support for generics. The good news is that with the release of Go 1.18 in early 2022, generics are now officially part of the language. This is a game-changer for Go...
The SOLID principles are a set of five design principles that help software developers create clean, maintainable, and scalable code. These principles were introduced by Robert C. Martin and have become fundamental guidelines in the world of software development. In this blog post, we'll explore...
Domain-driven design (DDD) is a software development approach that emphasizes the importance of understanding the business domain in order to create effective software solutions. By identifying and modeling key business concepts, DDD helps developers create software that aligns with the needs of...
The way we design, build and deploy web applications has changed a lot in the past few years. In the beginning, It all seemed like a simple task, our code lived all inside a big folder with a bunch of files in it, then we just uploaded the files using FTP and hoped everything would work out...
If you have to implement an API with CRUD operations on MongoDB with Go, but with the caveat that the documents on a collection had to be deleted using the soft delete pattern, then continue reading to find out how. You can find the full source code here:...
So, what is it about? The Factory Method design pattern solves the problem of creating objects without specifying their concrete classes. It provides an interface to create them in a parent class but allows child classes to change the type of objects that will be created. Interesting... How does...
One of the hardest things to do when working with containers is maintaining the image size small.Adding resources and commands to Dockerfile is easy and fast, but cleaning the artifacts these commands produce is not.To keep the size small we can try to remove all unused packages, and files and...