Miblog

Recent Post

cover image

My blog runs on Kubernetes and I like it

As I approach that famous middle age now, I realised that most of my online presence is controlled by big US companies. Pretty ironic for someone who has been using Linux and open source for decades, is not? So I went through a bit of a transformation process starting with …

cover image

Go programming language has a new version 1.21. Release Notes. Each new release contains a lot of great stuff and 1.21 is not an exception. In fact it is pretty massive. New numbering scheme, so the 21 in 1.21.0 is a Go language version. However still under v1 compatibility …

cover image

Turris Omnia and syncthing

The Turris Omnia router is an unusual device. Manufacturers tend to abandon their devices after a while, forcing their customers to buy shiny new hardware. The good souls behind the Omnia, the Czech domain registry CZ NIC, have a different strategy. They are constantly improving …

cover image

@hintjensquotes@botsin.space: a server-less Mastodon bot

Why and how I built the simply server-less @hintjensquotes@botsin.space bot. And my tribute to Pieter. Recently I setup the Mastodon bot serving quotes of Pieter Hintjens. Pieter was one of the most influential man I ever met. And I do consider his ideas as brilliant, …

cover image

Testify: make Go testing easy 3/3

While Go comes with go test and a testing package by default, the experience can be better with testify package. Git hub page introduces it as Go code (golang) set of packages that provide many tools for testifying that your code will behave as you intend. By the end I found the …

cover image

Testify: make Go testing easy 2/3

While Go comes with go test and a testing package by default, the experience can be better with testify package. Git hub page introduces it as Go code (golang) set of packages that provide many tools for testifying that your code will behave as you intend. By the end I found the …

cover image

Testify: make Go testing easy 1/3

While Go comes with go test and a testing package by default, the experience can be better with testify package. Git hub page introduces it as Go code (golang) set of packages that provide many tools for testifying that your code will behave as you intend. By the end I found the …

cover image

Easy way to check go.mod replace via Linux namespaces

The common problem for monorepo and go modules is that the following It is really easy to miss the go.mod replace directive In a following text we will learn more about Linux, namespaces and container technologies like Docker or Podman. The problem While go build is awesome tool, …

cover image

Correct Usage of Sql Transaction in Postgres From Go

Problem Once upon a time I got a task to merge duplicate URLs in our production database. It turned out that there were a lot of same urls like https://example.com?fbclid=1234 and https://example.com?fbclid=5678 we wanted to merge. Code to normalize URL was easy to develop. Code …

cover image

Implement Sql Database Driver in 100 Lines of Go

Go database/sql defines interfaces for SQL databases. Actual driver must be implemented in own package. And dependency injection is done as a part of import and build system. Lets go deeper to see how it is actually implemented. This exercise will result in a simple driver backed …