Tags: pavius/impi
Tags
Fix handling of comments in import groups (#11) I noticed #10 introduced a regression in that a comments sitting on a separate line are now ignored - leading to the `importInfo` "value" being set to an empty string. This trips things up further along as empty string implies a separate group. I've tried to address this by retaining "value" as the raw value (renamed to `lineValue` for clarity), and adding a new field to `importInfo` which contains the import path, if valid for the given line.
Use go/scanner to extract import path (#10) * Use go/scanner to extract import path This should be more reliable than stripping out unwanted parts of the import line. Most notably it resolves #9 Note that I've not been able to verify this on an exhaustive set of examples. Also note that there are still potential gotchas around mutli line comments.. debatable whether or not those are worth addressing (and definitely not wanting to cover in this PR, given it has immediate benefits). * Improve error line; ensure a string is printed