esdiff
esdiff copied to clipboard
catch bug ^_^
I think 'case doc, ok := <-dstCh:' maybe change srcCh.
if srcDoc != nil && dstDoc == nil {
diffCh <- Diff{Mode: Deleted, Src: srcDoc}
for {
select {
case doc, ok := <-dstCh:
if !ok {
return
}
diffCh <- Diff{Mode: Deleted, Src: doc}
case <-ctx.Done():
errCh <- ctx.Err()
return
}
}
}