aboutsummaryrefslogtreecommitdiff
path: root/roomserver
diff options
context:
space:
mode:
authorS7evinK <tfaelligen@gmail.com>2020-10-01 21:00:56 +0200
committerGitHub <noreply@github.com>2020-10-01 20:00:56 +0100
commit3e01db0049a839eb163523990b383156b69527c2 (patch)
tree589412a5caf83c37a3661618e11c5f8d4d7dad21 /roomserver
parent7048532bc4adcc017739fae358fd6b6c44b63ebd (diff)
Fix golangci-lint issues (#1464)
* Fix S1039: unnecessary use of fmt.Sprintf * Fix S1036: unnecessary guard around map access Signed-off-by: Till Faelligen <tfaelligen@gmail.com>
Diffstat (limited to 'roomserver')
-rw-r--r--roomserver/state/state.go6
1 files changed, 1 insertions, 5 deletions
diff --git a/roomserver/state/state.go b/roomserver/state/state.go
index 9ee6f40d..0663499e 100644
--- a/roomserver/state/state.go
+++ b/roomserver/state/state.go
@@ -717,11 +717,7 @@ func ResolveConflictsAdhoc(
// Append the events if there is already a conflicted list for
// this tuple key, create it if not.
tuple := stateKeyTuple{event.Type(), *event.StateKey()}
- if _, ok := eventMap[tuple]; ok {
- eventMap[tuple] = append(eventMap[tuple], event)
- } else {
- eventMap[tuple] = []gomatrixserverlib.Event{event}
- }
+ eventMap[tuple] = append(eventMap[tuple], event)
}
// Split out the events in the map into conflicted and unconflicted