fix golint issues in core/filex (#485)

This commit is contained in:
Kevin Wan
2021-02-19 14:30:38 +08:00
committed by GitHub
parent 802549ac7c
commit c376ffc351
5 changed files with 22 additions and 11 deletions

View File

@@ -5,12 +5,15 @@ import (
"os"
)
// OffsetRange represents a content block of a file.
type OffsetRange struct {
File string
Start int64
Stop int64
}
// SplitLineChunks splits file into chunks.
// The whole line are guaranteed to be split in the same chunk.
func SplitLineChunks(filename string, chunks int) ([]OffsetRange, error) {
info, err := os.Stat(filename)
if err != nil {