Go Time: Golang, Software Engineering cover image

What's new in Go 1.20

Go Time: Golang, Software Engineering

CHAPTER

Go Code - The Context Package

The context package, it defines an interface and part of the interface is that you can cancel the context. So what's new in Go 1.20 is now there's context with cancel cause and that will tell you why something was canceled. The main use of the context type in Go is to define deadlines. You can say, I want this request to try to go in the next two seconds. And if it doesn't get done in two seconds, just give up and abort because by then the user will have already pressed back and gone away.

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.
App store bannerPlay store banner