We’re going to write useful linter for Go using go/analysis. Then we will integrate it into go vet and golangci-lint. What to lint Let’s find all printf-like functions that don’t end with f. It’s the Go convention to name such functions with f at the end: fmt.Sprintf, fmt.Errorf, fmt.Printf, fmt.Fprintf, fmt.Scanf, fmt.Sscanf, log.Printf, log.Fatalf, log.Panicf. Writing a simple linter Sample program with an issue Let’s use the following example program for explanation and testing.
I’m running GolangCI SaaS service for static code analysis in Cloud. The service allows running custom user-defined commands before analysis (e.g. like TravisCI does). GolangCI.com SaaS service I needed to find a way to run untrusted code on our servers. Business Requirements User-defined commands should be run inside a Docker container for users’ convenience: they could easily test these commands locally in the same environment.
Why Do I Need PostgreSQL on Kubernetes I’ve decided to migrate GolangCI from Heroku to Kubernetes. Before that GolangCI used Heroku PostgreSQL as the primary database. The popular way to migrate is to use managed cloud PostgreSQL service like AWS Aurora or Google Cloud SQL. For example Algolia migrated from Heroku to GKE and used Google Cloud SQL. But I needed fully controlled solution because GolangCI has on-premise version which should work on a local Kubernetes cluster without access to AWS or Google Cloud.
I’ve just decided to start a blog. Here’s some history behind it. Blog Engine vs Static Blog Generator I have some experience building web apps with Django, RoR, Go (raw, beego). But I was looking for more lightweight solution. I love Go (Golang) and first I’ve googled golang blog engine. I found Journey and Ghost. Ghost is simple and lightweight These solutions are CMS-like (like Wordpress), but more modern and lightweight.