-
Notifications
You must be signed in to change notification settings - Fork 213
Enable staticcheck #604
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
Enable staticcheck #604
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -21,14 +21,12 @@ func (optr *Operator) getHTTPSProxyURL() (*url.URL, error) { | |
| return nil, err | ||
| } | ||
|
|
||
| if &proxy.Spec != nil { | ||
|
Contributor
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
Contributor
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I didn't change the check. I removed it and what you see now is the inner-check. The outer-check was superfluous for the reason mentioned above. |
||
| if proxy.Spec.HTTPSProxy != "" { | ||
| proxyURL, err := url.Parse(proxy.Spec.HTTPSProxy) | ||
| if err != nil { | ||
| return nil, err | ||
| } | ||
| return proxyURL, nil | ||
| if proxy.Spec.HTTPSProxy != "" { | ||
| proxyURL, err := url.Parse(proxy.Spec.HTTPSProxy) | ||
| if err != nil { | ||
| return nil, err | ||
| } | ||
| return proxyURL, nil | ||
| } | ||
| return nil, nil | ||
| } | ||
|
|
||
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.
There is no formatting of the strings required here.