You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: cmd/goimports/goimports.go
+8-4Lines changed: 8 additions & 4 deletions
Original file line number
Diff line number
Diff line change
@@ -26,10 +26,11 @@ import (
26
26
27
27
var (
28
28
// main operation modes
29
-
list=flag.Bool("l", false, "list files whose formatting differs from goimport's")
30
-
write=flag.Bool("w", false, "write result to (source) file instead of stdout")
31
-
doDiff=flag.Bool("d", false, "display diffs instead of rewriting files")
32
-
srcdir=flag.String("srcdir", "", "choose imports as if source code is from `dir`. When operating on a single file, dir may instead be the complete file name.")
29
+
list=flag.Bool("l", false, "list files whose formatting differs from goimport's")
30
+
write=flag.Bool("w", false, "write result to (source) file instead of stdout")
31
+
doDiff=flag.Bool("d", false, "display diffs instead of rewriting files")
32
+
srcdir=flag.String("srcdir", "", "choose imports as if source code is from `dir`. When operating on a single file, dir may instead be the complete file name.")
33
+
failUnclean=flag.Bool("f", false, "exit with non-zero code if any of the files needed changes")
33
34
34
35
verbosebool// verbose logging
35
36
@@ -176,6 +177,9 @@ func processFile(filename string, in io.Reader, out io.Writer, argType argumentT
0 commit comments