Golang Resparse

A little while ago I found my self needing to be able to parse screen resolutions when generating some images in a golang program. I created a library to do this and had a bit of fun optimising it. The result is open source on github. It is a very simple library with a single function but I thought it might be interesting to walk you through the process. What we need to build is a function that takes a string like “1080p”, “800x600”, or “4K” and returns a width and height value....

2018 December 8 · Emily Selwood