fix: 修复 file.ReadLineWithParallel 函数返回的偏移值不准确的问题
This commit is contained in:
parent
61b4ef7a8c
commit
f3ae5a3957
|
@ -181,7 +181,7 @@ func ReadLineWithParallel(filename string, chunkSize int64, handlerFunc func(str
|
||||||
defer wg.Done()
|
defer wg.Done()
|
||||||
|
|
||||||
endMutex.Lock()
|
endMutex.Lock()
|
||||||
e := chunk[1] - chunk[0]
|
e := chunk[1]
|
||||||
if e > end {
|
if e > end {
|
||||||
end = e + 1
|
end = e + 1
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue