Go int to string performance

Why this post? It’s not exactly the sexiest of topics but it’s something we do a lot of as developers, outputting integers as strings. But there are some huge differences in performance depending on how you go about this in Go. Round 1 - fmt.Sprintf() The first contender here is fmt.Sprintf a handy goto for a lot of string formatting problems. So we have the code below, we’ll be using this simple loop and a string builder for all the examples to get a true measure of the differences....

February 19, 2021 · 5 min · Scott Fairclough

Giving something back

Let’s get this started! Like most developers I’ve used a significant amount of open source libraries in the past across all technologies from Go to Javascript. It’s time to give a little back. I recently spun up the Hexosoft site and as part of this needed a simple mechanism to ensure that I didn’t get spammed by bots that accessed the form on the homepage. The site’s backend is very small, just handling this one concern and integrating with mailgun to get the message to me....

February 5, 2021 · 1 min · Scott Fairclough