-
-
Notifications
You must be signed in to change notification settings - Fork 31
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
Implement transformation of header #45
Conversation
implement transformation of header
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.
Please see my comments. Also there are a few other things:
- Please don't use the merge button on GitHub (it breaks history), instead, rebase properly on your machine.
- Please update the documentation with your changes.
- Please add an entry to the
Changed
section in the CHANGELOG.md. - I updated the CI configuration and it's building fine now on the stable. Yours should pass, too now.
@@ -176,7 +176,7 @@ public class CSVImporter<T> { | |||
/// - recordMapper: A closure to map the dictionary data interpreted from a line to your data structure. | |||
/// - Returns: `self` to enable consecutive method calls (e.g. `importer.startImportingRecords {...}.onProgress {...}`). | |||
public func startImportingRecords( | |||
structure structureClosure: @escaping (_ headerValues: [String]) -> Void, | |||
structure structureClosure: @escaping (_ headerValues: [String]) -> [String], |
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.
I think this should be marked as @discardableResult
so code with current behavior doesn't break.
@@ -235,16 +234,15 @@ public class CSVImporter<T> { | |||
/// - recordMapper: A closure to map the dictionary data interpreted from a line to your data structure. | |||
/// - Returns: The imported records array. | |||
public func importRecords( | |||
structure structureClosure: @escaping (_ headerValues: [String]) -> Void, | |||
structure structureClosure: @escaping (_ headerValues: [String]) -> [String], |
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.
See above.
Fixes. #44.