gci is
a tool that controls golang package import order and makes it always deterministic.
When linting the code with golangci-lint, the changes required by the gci linter are not directly applied. One then has to manually apply them. For this get gci
with
go install github.com/daixiang0/gci@latest
scan it and directly write required changes with
gci write --skip-generated -s standard,default .
--skip-generated
skips generated files
-s standard,default
defines how import inputs are processed. standard
are all official Golang provided imports, default
are all other ones.
gci
which is skipping that file with the given flags. This isn't part of thego
toolchain or language. – Backspingolangci-lint
(it aggregates multiple linters, and print the name of the linter which generated a warning in paretheses), is it correct? Please do not force those who's about to help to do psychic debugging. – Pictogramgolangci-lint
, then here are the GCI's docs and this explains how to tweaks settings of particular linters or exclude specific files from being linted by particular linters etc. – Pictogram