staticcheck fixes
This commit is contained in:
parent
6f01c992af
commit
ee47798714
|
@ -97,7 +97,7 @@ func (gf *GroupFunctionality) HandleImportString(peer peer.CwtchPeer, importStri
|
||||||
if len(bundle) == 2 {
|
if len(bundle) == 2 {
|
||||||
err := gf.HandleImportString(peer, bundle[0][len(tofuBundlePrefix):])
|
err := gf.HandleImportString(peer, bundle[0][len(tofuBundlePrefix):])
|
||||||
// if the server import failed then abort the whole process..
|
// 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 features.ConstructResponse(importBundlePrefix, err.Error())
|
||||||
}
|
}
|
||||||
return gf.HandleImportString(peer, bundle[1])
|
return gf.HandleImportString(peer, bundle[1])
|
||||||
|
|
|
@ -161,7 +161,7 @@ func (eh *EventHandler) handleAppBusEvent(e *event.Event) string {
|
||||||
group := profile.GetGroup(groupId)
|
group := profile.GetGroup(groupId)
|
||||||
|
|
||||||
// Check that the group is cryptographically valid
|
// Check that the group is cryptographically valid
|
||||||
if group.CheckGroup() == false {
|
if !group.CheckGroup() {
|
||||||
continue
|
continue
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -285,7 +285,7 @@ func EnrichNewPeer(handle string, ph *PeerHelper, ev *EventProfileEnvelope) erro
|
||||||
} else {
|
} else {
|
||||||
// could be a server?
|
// could be a server?
|
||||||
log.Infof("sorry, unable to handle AddContact(%v)", handle)
|
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
|
return nil
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue