Having a lot of projects, each has a lot of microservices and dbs, tired of executing the same queries, switching between dbs (yeah, not all clusters are available in monitoring panels).
godedup is a small Go CLI tool that finds structurally duplicate functions in Go code. It does not compare raw text.
It does not care if variable names changed.
It does not care if string literals changed.
It looks at the shape of the code.
I fully understand you. During my "compiler-writing" experience, I've realized how easy it is to spend weeks making things that at first glance seem to be the easiest in the world (like parsing C89 declarator: "int f(void);"), and to say exactly what the "f(void)" is :)
Yes, I know about this tool, it's great.
I watched videos about how it was developed, what difficulties there
were in achieving delta backups, and how the developers also spent a ton of
time studying the PostgreSQL source code. And I studied the Wal-G source code myself.
I just never had to use it at work, since I was used to pgBackRest and, a
bit later, to Barman. Wal-G focuses on cloud and universality
(i.e., it's not only used for PG, but has a unified interface for many different storage systems).
Initially, I didn't even have the idea of making a complete, reliable tool.
Over time, I started striving toward exactly that.
When there was an available hypervisor at work, I set up k8s there and
ran my receiver for several dev databases, just to test its operation 24/7,
setting aggressive config parameters (frequent compression, unloading, cleanup,
frequent backups, etc.). At the same time, I was choosing not small
databases, but quite real production ones, with various nightly integrations
for data population (external APIs, Airflow, and all that), blobs/tablespaces.
And of course I read your articles, and watched a lot of videos