I am using the below package to make a outbound http request https://github.com/parnurzeal/gorequest
For eg I am making a GET request like below res, body, errs = goReq.Get(url).End()
My question is how to figure out if there is timeout in the request.
Since the Timeout method sets the dealines for dial, read, and write, you can use os.IsTimeout (all error types in the net and net/url packages implement
Timeout() bool
). Contexts are not supported by gorequest, so context.Canceled doesn't have to be considered: