Skip to content
This repository has been archived by the owner on Sep 6, 2022. It is now read-only.

fix staticcheck errors #191

Merged
merged 11 commits into from
Mar 30, 2021
Merged

fix staticcheck errors #191

merged 11 commits into from
Mar 30, 2021

Conversation

marten-seemann
Copy link
Contributor

This was not fun...

Copy link
Member

@Stebalien Stebalien left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks!

@@ -87,8 +87,7 @@ func TestAddrInfosFromP2pAddrs(t *testing.T) {
if len(infos) != 0 {
t.Fatal("expected no addrs")
}
infos, err = AddrInfosFromP2pAddrs(nil)
if err == nil {
if _, err = AddrInfosFromP2pAddrs(nil); err == nil {
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

nit: in general, when using the if = form, use if :=. This if statement has side effects which can be very confusing when skimming code.

@Stebalien Stebalien merged commit ea8b369 into master Mar 30, 2021
@Stebalien Stebalien deleted the fix-linters branch March 30, 2021 23:13
@aschmahmann aschmahmann mentioned this pull request Aug 23, 2021
62 tasks
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants