-
-
Notifications
You must be signed in to change notification settings - Fork 1
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
add From, To to XsvRead #13
base: main
Are you sure you want to change the base?
Conversation
if err := r.checkFromTo(); err != nil { | ||
return err | ||
} | ||
i := 1 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There is a +2 in the bottom line, so the relationship must be examined.
fieldInfo := outInnerStructInfo.Fields[j] | ||
if err := setInnerField(&outInner, outInnerWasPointer, fieldInfo.IndexChain, csvColumnContent, fieldInfo.omitEmpty); err != nil { // Set field of struct | ||
return &csv.ParseError{ | ||
Line: i + 2, //add 2 to account for the header & 0-indexing of arrays |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
TODO: If From is other than 1, the value entering Line will be incorrect.
3a173fa
to
e5b0241
Compare
} else { | ||
to = len(csvRows) | ||
} | ||
body := csvRows[r.From:to] |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
fromも考慮する必要がある。ヘッダーなしcsvが読み込まれている場合とか。。
No description provided.