-
-
Notifications
You must be signed in to change notification settings - Fork 113
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
This code is a bit tricky since we have to be careful to not break other imports, and to not move comments around too much. Fixes #8.
- Loading branch information
Showing
2 changed files
with
85 additions
and
0 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,39 @@ | ||
[gofumports] skip 'don''t add or remove imports' | ||
|
||
gofumpt -w foo.go . | ||
cmp foo.go foo.go.golden | ||
|
||
-- foo.go -- | ||
package p | ||
|
||
import ( | ||
"io" | ||
|
||
_ "bufio" // for a side effect | ||
) | ||
|
||
import ( | ||
"os" | ||
|
||
"foo.localhost/other" | ||
|
||
bytes_ "bytes" | ||
|
||
"io" | ||
) | ||
-- foo.go.golden -- | ||
package p | ||
|
||
import ( | ||
"io" | ||
|
||
_ "bufio" // for a side effect | ||
) | ||
|
||
import ( | ||
bytes_ "bytes" | ||
"io" | ||
"os" | ||
|
||
"foo.localhost/other" | ||
) |