Let's Go

By chimo on (updated on )

This is a short tale about my first interactions with the Go language.

As I wrote about recently, I started using openring to display a blogroll at the bottom of my blog posts. As it turns out, it was having issues fetching one particular feed, erroring out with "expected element type <feed> but have <html>". The feed looked like valid RSS to me when fetching it with `curl`, so I suspected it might be user-agent related.

A quick look into the openring source code showed that it's using SlyMarbo/rss to fetch and parse RSS feeds. A quick search in the project's issue tracker revealed someone having the same issues as me, and a link to a different issue with a code example on how to set a custom User Agent.

I spun up a new Incus container for Go development and after a few trials and errors I managed to get something working.

I haven't spent enough time with the language to have a real opinion of it, but I think I could see myself enjoying it. Coming from PHP, JavaScript and Python, I initially found the `=` vs. `:=` concept a little confusing. The variable scoping gave me a little bit of trouble at first, but managed to get my head around both after reading a few blurbs about them here and there.

I do like how the compiler seems to be opinionated/strict for things like declared variables that aren't used and similar things to that.

All around an interesting way to spend part of an evening yesterday.

Recent articles from blogs I follow

The Scunthorpe Problem

I was talking with a friend recently about an email of theirs running afoul (🐔) of another aggressive filter system, because they dared to to talk with someone called Dickson. I know right, they’re the absolute worst. For those unfamiliar, this is the The…

via Rubenerd November 21, 2024

In which Neil is surprised by the lack of an HDMI cable

Some modern technology decisions baffle me. Today, I was sitting in a meeting room. In the room was my friend, with her laptop. Her laptop has an HDMI port. Also in the room was a screen, onto which my friend wished to display her laptop’s desktop. The screen …

via Neil's blog November 19, 2024

Helm: JSON schema generation

Helm charts support the inclusion of a values.schema.json file to validate values.yaml. Documentation: https://helm.sh/docs/topics/charts/#schema-files A JSON schema is akin to defining the structure of and type-annotating a JSON file. It helps to “shift lef…

via not just serendipity November 14, 2024