Skip to content
Open
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -93,7 +93,7 @@ Flags:
blank - blank section, contains all blank imports.
--skip-generated Skip generated files
--custom-order Enable custom order of sections. If specified, make the section order the same as your configuration order. The default order is standard > default > custom > blank > dot.
--format-always Format the file even if no imports are defined. By default, formatting doesn't run when there are <= 1 imports.
--format-always Format the file even if no imports blocks are defined. The default value is false.
```

```shell
Expand Down Expand Up @@ -158,6 +158,7 @@ Flags:
dot - dot section, contains all dot imports.
--skip-generated Skip generated files
--custom-order Enable custom order of sections. If specified, make the section order the same as your configuration order. The default order is standard > default > custom > blank > dot.
--format-always Format the file even if no imports blocks are defined. The default value is false.
```

### Old style
Expand Down
2 changes: 1 addition & 1 deletion cmd/gci/gcicommand.go
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ func (e *Executor) newGciCommand(use, short, long string, aliases []string, stdI
e.rootCmd.AddCommand(&cmd)

debug = cmd.Flags().BoolP("debug", "d", false, "Enables debug output from the formatter")
formatAlways = cmd.Flags().Bool("format-always", false, "Format the file even if no imports are defined.")
formatAlways = cmd.Flags().Bool("format-always", false, "Format the file even if no imports blocks are defined. The default value is false.")

sectionHelp := `Sections define how inputs will be processed. Section names are case-insensitive and may contain parameters in (). The section order is standard > default > custom > blank > dot. The default value is [standard,default].
standard - standard section that Go provides officially, like "fmt"
Expand Down