Winni's landfill

apg.go - Yet another APG clone


You may remember my previous blog entry about my APG-clone written in Perl. Well, since I just started learning Go I used it as my first project.

A different programming langauge

I mainly build stuff in the classic scripting languages like Perl, Java-/TypeScript, ZSH/Bash. And while I enjoy using those languages, I often find it fairly annoying having to install lots of packages, dependencies and stuff just to run a simple program. Therefore an alternative language, that can be complied and is capable of running on multiple platforms, is something I was eager to learn. Sure, I could use C or C++, but frankly my C/C++ is so rusty, that chances are high, that I add lots of memory leaks and fucked up pointers to my programs. So I’d rather use something that takes this burden of my shoulders - in other word: that is memory-safe.

I looked at different options:


As I wanted to gain some more experience, I settled for a simple project, that shouldn’t be too hard to build with my very limited Go-knowledge. I decided to use my APG clone written in Perl as my first real project.

First I tried to replicate the featureset of Once I got that working in Go, I started to implement more features of the original APG. I also took the opportunity to build some propper testing, to also familiarise myself with how tests work in Go.

The result can be found here: apg.go

Binary releases

What’s very cool is, that supports Go workflows out of the box. This way I can build, test and release directly from Once I am satisfied with the current state of the code, I simply create a new release-tag and Github will automagically build APG binaries for all platforms and architectures, it will zip the files (together with the LICENSE and and attach it to the release page. This is something I was never able to do with my usual Perl/TypeScript/Bash scripts.

Old and new features

As said, I implemented the same functionality as but also added some new features, like the spelling of passwords or using the -M parameter to specify password types in one go.

CLI options available

apg.go is OSS

Same as, I released apg.go as OSS under the MIT license. So feel free to use the software and enhance it to your liking. PR are welcome.

Go back