
What's new in Go 1.20
Go Time: Golang, Software Engineering
How to Fix a Database Error in an Application?
errors.is can be used to create some sort of a hierarchy in your application. So let's say you have a database error and it can't find a row, but then you want to turn that into like a 404 in your handler somewhere else. You can do this very easily because when you do a fumped.error f, so the format package, the FMT package, before you could only include one error in your format string with the percent W, but now you can do multiple percent W's. And so then those two can be smashed together just very quickly and easily without having to like create your own type and have it respond to both selectors and stuff.
00:00
Transcript
Play full episode
Remember Everything You Learn from Podcasts
Save insights instantly, chat with episodes, and build lasting knowledge - all powered by AI.