Using Machine Learning to help us communicate better

How to Disable http.FileServer Directory Listings

A nice feature of Go's http.FileServer is that it automatically generates navigable directory listings, which look a bit like this: But for certain applications you might want to prevent this behavior and disable directory listings altogether. In this post I’m going to run...

Command-line autocomplete for Go documentation

Updated (2023-03-06) Go has a great, well documented standard library. You may find yourself spending a fairly significant chunk of your Go programming time digging in stdlib docs, which is reasonable to expect at least for novice Go coders. How do folks look for stuff in the doc...

When using Microservices or Modular Monolith in Go can be just a detail?

Nowadays we can often hear that monolithic architecture is obsolete and responsible for all evil in IT. We often hear that microservices architecture is a silver bullet which helps to kill all this monolithic evil. But you probably know that there are almost no silver bullets in...

2º Joinville Go Meetup

It was the Go 1.10 Release party - my talk was about what changed in Go 1.10.

Creating debs and rpms with Go

I’ve been working on GoReleaser for more than a year now, and one of the things that was bothering me the most was fpm. Not that fpm is bad or anything like that, is just that it can be unstable: it uses the system tar (GNU tar is different from BSD tar) and its written in...

Focus On Being Precise

Introduction I was guided for many years to write functions that are generalized and to create layers upon layers of abstraction so things don’t break as business requirements change. That the cost of breaking a function signature, for example, is expensive and something that s...

So you want to use GoGo Protobuf

Introduction In the Go protobuf ecosystem there are two major implementations to choose from. There’s the official golang/protobuf, which uses reflection to marshal and unmarshal structs, and there’s gogo/protobuf, a third party implementation that leverages type-spec...

I was invited to a meetup

Introduction After my presentation at the Go London meetup I was approached on Gophers slack by a gentleman from Hungary called Máté Gulyás. Máté is one of the organisers of the Budapest Go Meetup, and was reaching out to me to ask if I would like to come down to Budapest an...

Configuring sql.DB for Better Performance

There are a lot of good tutorials which talk about Go's sql.DB type and how to use it to execute SQL database queries and statements. But most of them gloss over the SetMaxOpenConns(), SetMaxIdleConns() and SetConnMaxLifetime() methods — which you can use to configure the...