From ee47798714e51dfd8067a310f6bf730deaad4d01 Mon Sep 17 00:00:00 2001 From: Sarah Jamie Lewis Date: Wed, 2 Jun 2021 12:32:40 -0700 Subject: [PATCH] staticcheck fixes --- features/groups/group_functionality.go | 2 +- utils/eventHandler.go | 2 +- utils/manager.go | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/features/groups/group_functionality.go b/features/groups/group_functionality.go index 8a45144..19352e0 100644 --- a/features/groups/group_functionality.go +++ b/features/groups/group_functionality.go @@ -97,7 +97,7 @@ func (gf *GroupFunctionality) HandleImportString(peer peer.CwtchPeer, importStri if len(bundle) == 2 { err := gf.HandleImportString(peer, bundle[0][len(tofuBundlePrefix):]) // if the server import failed then abort the whole process.. - if strings.HasSuffix(err.Error(), "success") == false { + if !strings.HasSuffix(err.Error(), "success"){ return features.ConstructResponse(importBundlePrefix, err.Error()) } return gf.HandleImportString(peer, bundle[1]) diff --git a/utils/eventHandler.go b/utils/eventHandler.go index 337baf0..2351fa8 100644 --- a/utils/eventHandler.go +++ b/utils/eventHandler.go @@ -161,7 +161,7 @@ func (eh *EventHandler) handleAppBusEvent(e *event.Event) string { group := profile.GetGroup(groupId) // Check that the group is cryptographically valid - if group.CheckGroup() == false { + if !group.CheckGroup() { continue } diff --git a/utils/manager.go b/utils/manager.go index be2326a..87903fc 100644 --- a/utils/manager.go +++ b/utils/manager.go @@ -285,7 +285,7 @@ func EnrichNewPeer(handle string, ph *PeerHelper, ev *EventProfileEnvelope) erro } else { // could be a server? log.Infof("sorry, unable to handle AddContact(%v)", handle) - return errors.New("Not a peer or group") + return errors.New("not a peer or group") } return nil }