- What is context in Go?
Context is a package that contains a generic interface and some auxiliary functions to return context instances. It is used to synchronize operations between various parts of the application and to carry values. - What's the difference between cancellation, deadline, and timeout?
There are three different types of expiration for a context—cancellation is an explicit call to a cancellation function by the application, deadline is when the context goes over a specified time, and timeout is when the context survives a specific duration. - What are the best practices when passing values with a context?
Values passed around with context should be relative to the current scope or request. They should not be used as a way of passing around optional function parameters or variables that are essential to the application. It is also a good idea...
Germany
Slovakia
Canada
Brazil
Singapore
Hungary
Philippines
Mexico
Thailand
Ukraine
Luxembourg
Estonia
Lithuania
Norway
Chile
United States
Great Britain
India
Spain
South Korea
Ecuador
Colombia
Taiwan
Switzerland
Indonesia
Cyprus
Denmark
Finland
Poland
Malta
Czechia
New Zealand
Austria
Turkey
France
Sweden
Italy
Egypt
Belgium
Portugal
Slovenia
Ireland
Romania
Greece
Argentina
Malaysia
South Africa
Netherlands
Bulgaria
Latvia
Australia
Japan
Russia