Greetings all,
I have a channel of 'string', where each item is a single CSV log line that I want to convert to columns using "encoding/csv"
Currently, I am creating a new csv.Reader at each iteration for each item, which is much more work than it needs to be.
<snip>
for i := range feederChan {
r := csv.NewReader(strings.NewReader(i))
a := r.Read()
// Do stuff with a
// ...
}
</snip>
I would really appreciate sharing with me if there's a way to iterate through a 'chan string' using 'csv.Reader()' without the need to create a new Reader for each item.
Thanks.