A Go tool for sorting imports into configurable groups, removing unused imports, setting aliases, and formatting code.
goimports-reviser is a Go tool that sorts import statements into configurable groups, removes unused imports, sets aliases for versioned packages, and optionally formats code. It solves the problem of disorganized imports in Go projects by providing more control and automation than the standard goimports tool.
Go developers and teams who want consistent, readable import organization and automated code cleanup in their projects, especially those working in large codebases or with many dependencies.
Developers choose goimports-reviser for its enhanced import grouping, unused import removal, and alias management features, offering greater flexibility and cleaner code compared to the built-in goimports.
Right imports sorting & code formatting tool (goimports alternative)
Open-Awesome is built by the community, for the community. Submit a project, suggest an awesome list, or help improve the catalog on GitHub.
Allows sorting imports into customizable categories like std, general, company, and project using the -imports-order flag, enhancing code readability and team consistency.
Removes unused imports with -rm-unused and sets aliases for versioned packages via -set-alias, reducing manual errors and keeping code clean.
The -format option formats Go code in addition to import sorting, eliminating the need to run gofmt separately and streamlining workflows.
Creates dedicated import groups for internal organization packages with -company-prefixes, useful for large enterprises to maintain code organization.
Includes deprecated options like -file-path and -local, which can confuse users and require updates in existing scripts or configurations.
With numerous optional flags, setting up and enforcing consistent usage across a team may require additional documentation and effort.
Unlike goimports, it requires explicit flags for features like unused import removal, adding complexity for users who prefer minimal tooling.
goimports-reviser is an open-source alternative to the following products: