Fix docs for SyncPosition.WithUpdates

Signed-off-by: Alex Chen <minecnly@gmail.com>
This commit is contained in:
Cnly 2019-06-27 04:48:14 +08:00
parent aeceacd917
commit 6fd1c21207

View file

@ -41,8 +41,8 @@ func (sp SyncPosition) IsAfter(other SyncPosition) bool {
sp.TypingPosition > other.TypingPosition sp.TypingPosition > other.TypingPosition
} }
// WithUpdates returns a copy of sp with updates represented by other applied. // WithUpdates returns a copy of `sp` with updates represented by `other` applied.
// If a fieldn is not 0 in other, it is considered an update. // If a field is not 0 in `other`, it is considered an update.
func (sp SyncPosition) WithUpdates(other SyncPosition) SyncPosition { func (sp SyncPosition) WithUpdates(other SyncPosition) SyncPosition {
ret := sp ret := sp
if other.PDUPosition != 0 { if other.PDUPosition != 0 {