My need is similar to issue #26679 but not the same.

I am using 1.15.8

I have a need for the "current line number" when reading a csv file (with 
Reader.Read() ) so that I can report errors in the data (not a csv parsing 
error but errors in the data in the csv file).  In my case, a comment 
character is being used to allow my user to provide comments in the file 
for easier maintainability of their csv data.  Because of comments in the 
file the record number and line number are not the same so any reporting of 
errors to my user cannot point to any specific line number in the file for 
the data error ... I have to either give info on the record to my user or 
tell them the non-commented line number (neither being a user-friendly 
option as they have to look through the file to see where the real error is 
instead of going to a specific line number).

Any way to get the true (starting) line number of the current record as a 
file is being read using the Reader.Read() function?

Thanks
Dan

-- 
You received this message because you are subscribed to the Google Groups 
"golang-nuts" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to golang-nuts+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/golang-nuts/7915cd6d-29e8-48ab-bfbd-8b62a8912f7fn%40googlegroups.com.

Reply via email to