staticcheck fixes

This commit is contained in:
Sarah Jamie Lewis 2021-06-02 12:32:40 -07:00
parent 6f01c992af
commit ee47798714
3 changed files with 3 additions and 3 deletions

View File

@ -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])

View File

@ -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
}

View File

@ -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
}