Context in Golang

The Context package defines an API that provides support for deadlines, cancelation signals, and request-scoped values that can be passed across API boundaries to all the goroutines involved in handling a request. This API is an essential part of any application you will write in Go. This article describes how to use the package and provides a complete working example. In a Go implementation, we use goroutines to execute other functions inside the main function to run in the background simultaneously....

September 8, 2020 · 7 min · 1337 words · Me