3min chapter

Changelog Master Feed cover image

What's new in Go 1.20 (Go Time #267)

Changelog Master Feed

CHAPTER

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

Get the Snipd
podcast app

Unlock the knowledge in podcasts with the podcast player of the future.
App store bannerPlay store banner

AI-powered
podcast player

Listen to all your favourite podcasts with AI-powered features

Discover
highlights

Listen to the best highlights from the podcasts you love and dive into the full episode

Save any
moment

Hear something you like? Tap your headphones to save it with AI-generated key takeaways

Share
& Export

Send highlights to Twitter, WhatsApp or export them to Notion, Readwise & more

AI-powered
podcast player

Listen to all your favourite podcasts with AI-powered features

Discover
highlights

Listen to the best highlights from the podcasts you love and dive into the full episode