-
Notifications
You must be signed in to change notification settings - Fork 83
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
NewClient panics if http.client is nil and LINODE_CA is set #635
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM!
Co-authored-by: Zhiwei Liang <121905282+zliang-akamai@users.noreply.github.com>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM! Agree with Zhiwei's recommendation though.
@kokes looks like it needs a |
I committed from my phone and didn't realise your inline suggestion only fixed the function definition, not the call itself, updated that in a subsequent commit. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
I tried a new linodego with a custom CA and a nil HTTP client and encountered a panic. Here's a minimal reproducer (that I now include in the test suite):
Once I run this test, I get:
This is a followup to #593 - in this PR this LINODE_CA support got fixed, but not in the case of
hc == nil
, the constructor would panic uponhc.Transport
.