CopyCat is a CLI application I developed while learning the Go programming language.
Initially, I had planned to create the app using C to explore the idea of networking within C but ultimately decided to use Go.
At the time, Go was receiving a lot of praise, and I was interested in why it was suddenly rising in popularity,
so I thought, “Why not try making a project with it”. CopyCat was inspired by my frustration in copying around .env
files throughout
my workspace, as they wouldn’t (or shouldn’t) be committed to a repository. The original plan for CopyCat was to be a wrapper around the S3 API,
but as my love for self-hosted applications grew, I thought it’d be nice to explore MinIO.
Outcomes
I learned a lot through creating CopyCat, most notably how annoying it was to
deal with network-like applications in C (without using any external library),
but also what I like and don’t like about Go. It was nice to venture into a new
programming language and re-go through the frustration of learning the little
nuances of Go’s syntax, like types placed after the variables or the lack of
;
after almost every line.
int get_age() {
int my_age = 20;
return my_age;
}
vs
func get_age() int {
var my_age int = 20
return my_age
}
Another learning experience was adding update capability and automatic deployments. It was my first project which attempted to use CI/CD pipelines (using GitLab). I had set it up so every new version of the program I committed would automatically build and alert the CLI app that an update was available. After the app knew an update was available, replacing the binary in CopyCat’s install location was simple.
Looking forward
I want to continue to update the source code of the app, with a focus on fixing
a bug I’ve been having with sys.Umask
when building on Windows; commenting out
is the solution I’ve been using for now, but it definitely isn’t future-proof
nor a solution I am proud of. Apart from that, I need to remove some “MinIO”
exclusive code I had written so that it can fully work on any S3-compliant
service (i.e., AWS S3 or
CloudFlare R2).
Current Roadmap
Add full S3 support- Improve error handling
- Port GitLab CI/CD to GitHub Actions
- Fix
sys.Umask
dependency