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

Struct CsvFileIterator

backend/helpers/pluginhelper/csv_file_iterator.go:35–40  ·  view source on GitHub ↗

CsvFileIterator make iterating rows from csv file easier, it reads tuple from csv file and turn it into a `map[string]interface{}` for you. Example CSV format (exported by dbeaver): "id","name","json","created_at" 123,"foobar","{""url"": ""https://example.com""}","2022-05-05 09:56:43.438000000"

Source from the content-addressed store, hash-verified

33// "id","name","json","created_at"
34// 123,"foobar","{""url"": ""https://example.com""}","2022-05-05 09:56:43.438000000"
35type CsvFileIterator struct {
36 file io.ReadCloser
37 reader *csv.Reader
38 fields []string
39 row []any
40}
41
42type CsvRecord struct {
43 Key string

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected