Go is a statically typed compiled language designed to be concise and efficient. While Go is not a purely object-oriented language, we can still use design patterns to improve code readability and maintainability. Today, I will introduce a common design pattern: the Decorator pattern.

Read more »

Map-Reduce is a programming paradigm used for processing large-scale datasets. It helps simplify the process of parallel computation and improves computational efficiency.

Read more »

In the previous article, I briefly introduced the composite pattern in Go, which was explained in a simple manner. We understood that Go can achieve polymorphism in object-oriented programming through composition.

Read more »

In the previous tutorial, I have already introduced that Go language, unlike object-oriented programming languages such as Java and PHP, does not support keywords like class to define classes. Instead, it uses the type keyword combined with basic types or structures to define the type system. Additionally, it does not support explicitly defining inheritance relationships between types using the extends keyword.

Read more »

Go is not a fully object-oriented language, and some object-oriented patterns are not well-suited for it. However, over the years, Go has developed its own set of patterns. Today, I would like to introduce a common pattern: the Functional Options Pattern.

Read more »

This article is first published in the medium MPP plan. If you are a medium user, please follow me in medium. Thank you very much.

Go language has three types of pointers. In the normal development process, we only encounter the ordinary pointer. However, in the low-level source code of Go language, there are a lot of operations involving three types of pointer conversion and manipulation. Let’s clarify these points first.

Read more »

This article is first published in the medium MPP plan. If you are a medium user, please follow me in medium. Thank you very much.

Go1.22 a new math lib

The inaugural v2 version of the standard library in Go, hails from the esteemed math/rand/v2 repository. It is set to make its grand debut with the official release of Go1.22, poised to serve as a reliable and production-ready resource.

Read more »

This article is first published in the medium MPP plan. If you are a medium user, please follow me in medium. Thank you very much.

In the previous article, we used defer to recover from panics. In the practical work of a gopher, defer acts like a loyal and reliable teammate, silently helping us with the clean-up work behind the scenes. For example:

Read more »

This article introduces how I use free services to build my own blog

Read more »
0%