MCPcopy
hub / github.com/apache/devlake / NewCsvFileIterator

Function NewCsvFileIterator

backend/helpers/pluginhelper/csv_file_iterator.go:48–55  ·  view source on GitHub ↗

NewCsvFileIterator create a `*CsvFileIterator` based on path to csv file

(csvPath string)

Source from the content-addressed store, hash-verified

46
47// NewCsvFileIterator create a `*CsvFileIterator` based on path to csv file
48func NewCsvFileIterator(csvPath string) (*CsvFileIterator, errors.Error) {
49 // open csv file
50 csvFile, err := os.Open(csvPath)
51 if err != nil {
52 return nil, errors.Convert(err)
53 }
54 return NewCsvFileIteratorFromFile(csvFile)
55}
56
57// NewCsvFileIteratorFromFile create a `*CsvFileIterator` from a file descriptor
58func NewCsvFileIteratorFromFile(csvFile io.ReadCloser) (*CsvFileIterator, errors.Error) {

Callers 1

TestExampleCsvFileFunction · 0.85

Calls 2

ConvertMethod · 0.45

Tested by 1

TestExampleCsvFileFunction · 0.68