MySQL -> Go UUID

Simple UUID wrapper for MySQL in Go that covers UUID to BIN conversion

Here’s a quick snippet you can use to create a custom type that maps an UUID to a Binary(16) representation in MySQL. I assume this is not present in gofrs/uuid since it’s database specific, but having NullUUID available is an easy ‘inspiration’ opportunity ;). 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 import ( "database/sql/driver" "github....

20 August, 2023 · 1 min · 167 words · Alexandru Bucur
Reading books makes your brain less foggy

Are Dev Containers the future for local development environments?

TLDR: Maybe, but it's still a bit clunky. What are Dev Containers you might ask? Elementary, my dear Watson* / fellow developer. It’s a fancy way of using container images as a full blown development environment. You can read containers.dev for more details, but the key IMHO that is missing on the homepage, is that it can run actual compose.yaml (popularised by docker-compose) as an entry point. You can consider this post a follow up A Go(lang) journey in live reload and pretty panics....

02 August, 2023 · 6 min · 1101 words · Alexandru Bucur
How to make golang panics prettier

A Go(lang) journey in live reload and pretty panics

TLDR: Use docker + cosmtrek/air + panicparse One of my passions is DX, and while I’m not always getting it right, the enjoyment is there to make people’s lives a little bit more productive. Some context Coming from a predominantly PHP background, at least in my bubble, having “pretty” error messages when doing development is pretty much a given. Regardless of the framework you might be using all of them use php....

03 May, 2023 · 6 min · 1127 words · Alexandru Bucur

Golang Datetime Cheatsheet from strftime*

When I initially started working with Go the time format it seemed a bit clunky. Maybe it’s because it’s a departure from the normal strftime, but also maybe it’s also because there’s no simple cheatsheet for the various date formatting options like you would see for example in the PHP documentation or in the Python documentation or to use the fancy language of the day, the Rust Chrono crate documentation....

25 July, 2021 · 3 min · 499 words · Alexandru Bucur