Mortar

Mortar DesignBricks

Jump to Section

When we build software, most of us always try to rely on something we or others have built before us. Since we don’t want to reinvent the wheel, again.

Go’s standard library is an excellent example here. There are strings, time, http and many other build-in libraries that we use. While this example is great, it doesn’t scale to 3rd party libraries.

Let’s look at Logger libraries for example, there are:

You are encouraged to have a look at each library, but I can assure you, all of their APIs are different from each other. Mortar after all is a library, and its purpose to be used in many projects. That is why we defined different interfaces.

To easily differentiate an actual library from its Brick wrapper, every Brick package starts with a b.

  • bviper
  • bzerolog

Meaning you can’t import bzerolog from within bjaeger, for example.

Check their go.mod files to make sure.

This rule is here to ensure that every Brick can be easily swapped.