Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
imports: fixup comments on import lines correctly
The current implementation uses the added import specs EndPos to fixup the comments position after import specs is sorted. If two or more import specs have the same EndPos, a comment associated with one of them is always added to the last import spec. This commit uses the current import spec position to compute new position for next import spec. So there is never two or more specs have the same EndPos. Fixes golang/go#23709 Change-Id: I60ace9431d871e94a2b3d90892aa80d0671aeea0 Reviewed-on: https://go-review.googlesource.com/121878 Run-TryBot: Brad Fitzpatrick <bradfitz@golang.org> TryBot-Result: Gobot Gobot <gobot@golang.org> Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org>
- Loading branch information
Showing
2 changed files
with
36 additions
and
2 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters