I am a passionate technology leader, engineer and drummer with 20+ years of working experience. Formerly, I lead the technology for Starwood Hotels’ storied loyalty program, Starwood Preferred Guest (SPG) until the merger with Marriott hotels. More recently, I have been consulting for a variety of retail and small to medium businesses to further their cloud, CRM and Loyalty endeavors. My current technology focus is in Go, particularly backend APIs.
I have recently updated the way I handle errors in Go. In some ways, I’ve come full circle back to where I started, in others, I think I’ve evolved. When I initially wrote my errors post in June of 2021, I had come up with a hybrid of Rob Pike’s upspin errors and Dave Cheney’s https://github.com/pkg/errors package. This hybrid works well, however, in December 2021 https://github.com/pkg/errors was archived and, generally, the Go community seems to have opted for a simpler option of adding proper error context and wrapping errors.
I made a new linter called oplint! This was a really fun thing to do as I had never ventured into static analysis before. I created this tool to help me understand where an error originates without using the pkg/errors error stack functionality. The pkg/errors project has been archived and it seems the Go community has largely moved on to just wrapping errors using the standard library. I am moving away from using pkg/errors to use only the standard library as well, and am trying to make sure I can trace an error source in a standardized way.
A few weeks ago, I gave a presentation to the Boston Go Meetup on Low-Dependency Database Migrations and Integration, in which I discuss how I handle database migrations and database integration in the go-api-basic project that I’ve been working on. In the presentation I mention several tools that I use, so I wanted to add links to them here. Mage PostgreSQL JetBrains DataGrip sqlc The video for the talk is below: