NewCSV creates a new csv loader with an io.Reader and optional column names for filtering.
(r io.Reader, columns ...string)
| 23 | |
| 24 | // NewCSV creates a new csv loader with an io.Reader and optional column names for filtering. |
| 25 | func NewCSV(r io.Reader, columns ...string) CSV { |
| 26 | return CSV{ |
| 27 | r: r, |
| 28 | columns: columns, |
| 29 | } |
| 30 | } |
| 31 | |
| 32 | // Load reads from the io.Reader and returns a single document with the data. |
| 33 | func (c CSV) Load(_ context.Context) ([]schema.Document, error) { |
no outgoing calls
searching dependent graphs…