Golang How to differentiate between Context cancel and timeout
This post explains how to use Context for the process cancellation or timeout. Furthermore, it shows you how to implement it if you want to keep the process but want to introduce Timeout in it.