good morning!!!!

Skip to content
Snippets Groups Projects
Unverified Commit 7fd61364 authored by Gus Eggert's avatar Gus Eggert
Browse files

Fix dial panic when ctx is nil

When the ctx is nil, http.NewRequestWithContext returns a "net/http:
nil Context" error and a nil request. In this case, the dial function
panics because it assumes the req is never nil. This checks the
returning error and returns it, so that callers get an error instead
of a panic in that scenario.
parent 14fb98eb
No related branches found
No related tags found
No related merge requests found
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment