diff --git a/staging/kos/pkg/apis/network/types.go b/staging/kos/pkg/apis/network/types.go index eb3a13947..7f3be8a8d 100644 --- a/staging/kos/pkg/apis/network/types.go +++ b/staging/kos/pkg/apis/network/types.go @@ -84,8 +84,8 @@ func (writes WriteSet) SetWrite(section string, serverTime Timestamp) WriteSet { func (writes WriteSet) Diff(others WriteSet) WriteSet { ans := make(WriteSet, 0, len(writes)) for _, wr := range writes { - owr, _ := others.GetWrite(wr.Section) - if owr == (ObjectWrite{}) { + _, found := others.GetWrite(wr.Section) + if !found { ans = append(ans, wr) } } diff --git a/staging/kos/pkg/apis/network/v1alpha1/types.go b/staging/kos/pkg/apis/network/v1alpha1/types.go index 541a595d2..6469207e2 100644 --- a/staging/kos/pkg/apis/network/v1alpha1/types.go +++ b/staging/kos/pkg/apis/network/v1alpha1/types.go @@ -84,8 +84,8 @@ func (writes WriteSet) SetWrite(section string, serverTime Timestamp) WriteSet { func (writes WriteSet) Diff(others WriteSet) WriteSet { ans := make(WriteSet, 0, len(writes)) for _, wr := range writes { - owr, _ := others.GetWrite(wr.Section) - if owr == (ObjectWrite{}) { + _, found := others.GetWrite(wr.Section) + if !found { ans = append(ans, wr) } }