diff options
Diffstat (limited to 'modules/csv/csv.go')
-rw-r--r-- | modules/csv/csv.go | 5 |
1 files changed, 1 insertions, 4 deletions
diff --git a/modules/csv/csv.go b/modules/csv/csv.go index 30698830a4..2e2611aa81 100644 --- a/modules/csv/csv.go +++ b/modules/csv/csv.go @@ -29,11 +29,8 @@ func CreateReader(input io.Reader, delimiter rune) *stdcsv.Reader { // CreateReaderAndGuessDelimiter tries to guess the field delimiter from the content and creates a csv.Reader. func CreateReaderAndGuessDelimiter(rd io.Reader) (*stdcsv.Reader, error) { var data = make([]byte, 1e4) - size, err := rd.Read(data) + size, err := util.ReadAtMost(rd, data) if err != nil { - if err == io.EOF { - return CreateReader(bytes.NewReader([]byte{}), rune(',')), nil - } return nil, err } |