This week I put together a tiny Go project. Go’s been on my “to learn” list for years now but I’ve never quite gotten around to it. Over the summer I got as far as reading a few articles and skimming the documentation but I didn’t have the time to make anything.
I’m a contractor working, primarily, for two clients. One is an agency that has their own Harvest account for tracking time against client projects. The other client is a traditional product company, I track time and bill them with my own, separate, Harvest account. It’s a bit of an annoyance because having two separate Harvest accounts means I have to sign in twice just to figure out how many hours I’ve worked in the month so far. I created a little CLI (the CLI part is not quite implemented yet) to query both accounts, grab my monthly hours, and total them.
Strapped for time I asked Opencode to generate a basic query to an endpoint and parse the returned JSON, this outline was enough for me to go the rest of the way implementing what I needed.
You can check it out here, but unless your in the exact same situation as me, it’s likely not going to do you much good!